Jump to content


This topic is now archived and is closed to further replies.


HELP!? creating a user in mysql locally?

Recommended Posts



I'm dumb. I remember trying to figure this out before when I was working on it and now it's been two months and I forget how to do it. Hopefully, someone here will have the answer.


I'm installing oscommerce locally. I already have one instance of it up and running just fine. now I'm installing a second instance and I've run into this stumbling block again.


When working with myaql and phpmyadmin locally, what is the program that allows you to add a user and their password to a given mysql database? I remember that I couldn't do it with phpmyadmin, but there was another program either within mysql or phpmyadmin that allowed you to add users and set their passwords. now, I can't find it for the life of me. Once I get this out of the way, it's smooth sailing through the rest of the install. But I remember being stumped on this one last time around and I'm kicking myself for not remembering it.


Any help would be appreciated.




Share this post

Link to post
Share on other sites

Let me see if i understand you correctly. You want to create a new user and a new database to mysql. Well, first database access must be set up up by an existing databas user who has the ability to grant priviledges... here we go:


mysql -h localhost -p -u root

enter password: *****

mysql>GRANT ALL ON catalogb.* TO catusrb@localhost IDENTIFIED BY "catusrbpass";

mysql> QUIT


This creates a new user with the name "catusrb" and the password set as "catusrbpass" The GRANT statement creates the user if it does not already exist. The "*****" is the password you set up for the root user.


the "catalogb" is the name of the new database. I imaging that you want 2 databases if your running 2 seperate 'stores' right?

Keep in mind that this statement DOES NOT set up the database it just creates the user. When you go through the install process make sure that the database that you create has the same name as the one that the new user you created has access to. In this example the database name would be 'catalogb'

Hope this helps, and if i missed something PLEASE oh PLEASE dont shoot me:)

Share this post

Link to post
Share on other sites