![]() However I am still able to work with the first database I created. The method I mentioned above was a fluke and is not allowing me to create any new tables inside a new database. Please Note: While trying to create new databases I am once again receiving the #1046 error. However I don't believe this was the issue. It stands for all privileges available for the level at which privileges are to be granted except for the GRANT OPTION privilege. Moreover, this is a question that comes up regularly in the forums, on Slack or on StackOverflow. If not followed, the module will always report changes. If column privileges are used, the priv1,priv2 part must be exactly as returned by a SHOW GRANT statement. Database and table names can be quoted, MySQL-style. ![]() The format is based on MySQL GRANT statement. It appears to me resetting the privileges fixed the issue.Ĭan anyone tell me if this is a known bug, if I got lucky, or missed the point completely? Documentation I found concerning this error was mostly for importing a database and using the "Use Database_Name " to ensure the database was indeed selected. By granting the appropriate privileges to each user, you can ensure that your database remains secure while still allowing users to perform the tasks that they need to. MySQL privileges string in the format: db.table:priv1,priv2. Now I am able to create tables via the console. Frustrated, I "Uncheck All" then "Check All" global privileges. I double checked and found all privileges for the user were enabled. I had made sure the database was selected "USE database_name ", however I was still receiving the same error. To GRANT ALL privileges to a user, allowing that user full control over a specific database, use the following syntax: mysql> GRANT ALL PRIVILEGES ON databasename. I kept receiving the "#1046 - No database selected" error when trying to add a table to a database via the console window. 1 So, the world+dog now have the hash of your root password, the knowledge that root is accessible from any host on the Internet and the first byte of your IP address. ![]() TO 'root''' IDENTIFIED BY 'password' b) bind to all addresses: The easiest way is to comment out the line in your my. As root user execute with this substituting 'password' with your current root password : GRANT ALL PRIVILEGES ON. IMPORTANT NOTE While this answer can solve the problem of access, WITH GRANT OPTION creates a MySQL user that can edit the permissions of other users. Original answer: There's two steps in that process: a) Grant privileges. I ran into an issue using MySQL 5.5 running on xampp (Version 1.8.1). TO 'myuser''' WITH GRANT OPTION This is how I create my 'Super User' privileges (although I would normally specify a host).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |