July 1, 200917 yr 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.
July 1, 200917 yr 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