Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Creating a database user, strange problem?

Featured Replies

Hi all,

 

Please help on following as it is doing my head in!.

 

I am writing a script that will allow creation of databases + users for them. Below is the "query" being executed, and the outcome from the mysql.die

 

"GRANT all privileges ON webbhost_testdb.* TO `webbhost@localhost` IDENTIFIED BY '********'"

 

ERROR: Could not connect (): Unknown database 'testdb'

 

 

I really cannot get my head around this, as it clearly states "webbhost_testdb" and not "testdb".

 

Can someone please tell my why this is happening?

P.S. Yes I am using "root" access to process this.

  • Author

Ok actually I figured this bit out now, and it wasn't the above code, it was the mysql_db_query line below this.

 

Now I have another problem..

 

Queries:

1) GRANT all privileges ON webbhost_testdb.* TO `webbhost`@`localhost` IDENTIFIED BY '******'

2) GRANT all privileges ON webbhost_testdb.* TO `webbhost_testuser`@`localhost` IDENTIFIED BY '******'

 

Results:

 

1) - Username added

2) - Could not connect : The host or user argument to GRANT is too long

 

It would seem that it works if I just say "webbhost", but not if I say "webbhost_testuser"???

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.