Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

need to set sql permissions via the command line and im scared

Status
Not open for further replies.

mattquantic

Programmer
Mar 28, 2004
196
GB
Hi. I have a unix web server. The access I have to is via plesk - its really great.

But - the default config is to have to use a web interface to the mysql data base.

I would like to use the tools from mysql which are third party clients that are similar to enterprise manager.

I tried to connect to the mysql server but got the following error dialogue.

I contacted support to ask how to grant access from my connection. They pointed me to the following site:

I did not even know that the command line was something I needed ssl for...

After pointing this out the host reluctantly gave me the details to access the root, and said the instructions to open up permissions were here:

I have managed to connect to the mysql server via the commandline - but after being warned by the host that I could accidentally destroy the machine - and they would charge me to fix - I am a little paranoid.

I have had a look on the web access to the mysql server and there are currently no tables. So I assume the permissions tables are not accessible.

I am not sure what to type from this point:

Let say my ip trying to access is 192.162.0.1 and my username is MAT.

Do I type the following?

mysql> GRANT ALL PRIVILEGES ON db.*
-> TO MAT@'192.162.0.1';

I am really confused and stand to have to re-set up 30 web site if this machine get screwed.

Please advise if you have the patients.

M@)
 
That's the correct command, but you need the correct database name. I know it can't be 'db' because that's a reserved word. Use 'show databases' to try to figure out what you want to grant access to.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top