Logging into mysql and creating a database, how to?

Foge

Registered
(newbie question)
I try to log in to mysql in command line, but I get message that access denied for user xuser @ localhost. Xuser here represents my admin username and localhost is my best quess...

How should I write login line? If admin username is not valid, how can I resolve which user and password there should be? If localhost is wrong, what should it be there?

And when I get answer to that... I'm setting up a database for G2 gallery (gallery.menalto.com) -> how do I define path to database in gallery settings?

Sorry if these questions are too trivial. I just don't know how to get started.
 
Did you set up an account in mySQL called "xuser" (where xuser is something other than "root")? mySQL does not use Mac OS X's user accounts -- it has a completely separate set of user accounts that must be configured manually. "root" is set up automatically when you install mySQL, but any other user account must be set up within mySQL.

The "login" line for mysql should look like so:
Code:
mysql -u root -p
...to log in as root. You will then be prompted for the root password, which you should have also set up during/after the mySQL install. Do not confuse this root account with the root account in Mac OS X -- again, mySQL user accounts are completely separate from Mac OS X user accounts. To log in as another user that you have manually defined in mySQL, simply replace "root" with the username.

What relevant bits of the gallery documentation tell you how to point it to your mySQL server/database?
 
Wow and uuh. OS X Server 10.5 works that way that when I have started first webmail in website accounts - mysql is automatically started by the server. So mysql is up and running and I have no clue how to solve out password. I found instructions to reset mysql admin password, but there is about 20 mail accounts using those webmails. Can I be sure that they keep on working if I reset password - or can I somehow resolve existing mysql admin password?

With database path for gallery, I just mean the database address for config file: /something/something/something/databasename
 
Back
Top