Msg#: 3057463 posted 4:30 pm on Aug 23, 2006 (gmt 0)
Hi, I use godaddy's virtual dedicated servers and have SSH access, but they won't tell me what the command is for accessing mysql. Simply typing in "mysql" at the command line yields a 1045 error. Can anyone tell me how I can figure this out?
Msg#: 3057463 posted 4:45 pm on Aug 23, 2006 (gmt 0)
That is an "Access denied for user '%s'@'%s' (using password: %s)" message. When you invoke the command line interface (CLI) you need to specify at least the user and password, but often times the host and database as well. Try
mysql -u username -p databasename
You will be prompted for your password as that is what the -p switch is for. You could actually type in your password directly after the switch, but that is bad practice as it is entered into the bash logs where anybody with access to the logs will find your open text password.
Msg#: 3057463 posted 8:23 pm on Aug 23, 2006 (gmt 0)
I see. That worked. Now, that works if you're administering an existing database, but lets say that you don't have any databases on your server or that you want to create a new one. Would that be a ssh command?
Just so you know where I'm coming from, I have plesk installed on this server and so far, I've set up all my databases in plesk.
Msg#: 3057463 posted 8:37 pm on Aug 23, 2006 (gmt 0)
Oh I think I was logging in as an individual database user. Is there a way for me to figure out what the root login for mysql is through SSH? Or would I have to ask my web host? They're not very good at helping with this type of stuff.
Msg#: 3057463 posted 9:19 pm on Aug 23, 2006 (gmt 0)
You could try connecting using the Linux root user's password, if you have that - it's possible they're the same; or try connecting without a password - it's possible (horrible thought) that the root user doesn't have a password (simply use "mysql -u root").
Failing that I assume the password must be stored in the Plesk configuration somewhere if Plesk enables you to create databases. (I don't know Plesk so I've no idea where to look).
Msg#: 3057463 posted 9:29 pm on Aug 23, 2006 (gmt 0)
plesk has its own login, but it doesn't look like I can administer the mysql root login. I guess I can always just create databases along with corresponding logins in plesk and then mysql them in ssh. Oh well.