Originally posted by TBomb
I'm still kind of stuck, I've never used mysql from the CL before so I've got no idea how to do any of this. I speed read through those links
but none of really meant any of it. From what I can gather, I need to edit the user tables in the 'mysql' db. I on't even know how to do that
Its quite easy if you know SQL.
First connect to the mysql database as root:
And it should just connect and give you the > for the prompt like above. If you want to connect as an existing user with grant options/privileges you have to do a:
$ mysql -u<username> -p<password>
Once you are connected and have the > prompt simply select the mysql database:
> use mysql
It should tell you then if it switches the database to use.
> show tables;
That command will show you all the current tables for mysql database. If you then want to add a user with all privileges do this:
> GRANT ALL PRIVILEGES ON *.* TO 'user@hostname-or-ip' IDENTIFIED BY 'password';
That will give the user all privileges to all the databases. If you want them to have grant options as well, do this:
> GRANT ALL PRIVILEGES ON *.* TO 'user@hostname-or-ip' IDENTIFIED BY 'password' WITH GRANT OPTIONS;
The documentation at www.mysql.com
is quite extensive and helpful. If you know nothing about SQL I'd also suggest picking up a book or reading more tutorials online. It comes handy when you don't have that GUI to help you out.