create new database using phpMyAdmin

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
davek
Forum Newbie
Posts: 12
Joined: Sat Mar 15, 2003 5:21 pm
Location: chicago

create new database using phpMyAdmin

Post by davek »

I am using a mac 10.2.4 and have phpMyAdmin up. when i go to the index.php in my phpMyAdmin folder on my localhost the link for Create new database is not clickable. I see the test db and have used yourSQL to create a new test_ db, but cant create a new db using phpMyAdmin.

The page says:
Welcome to phpMyAdmin 2.4.0

MySQL 3.23.55-entropy.ch running on localhost as mysql@localhost
but i cant create new dbs. Should i be loging in with a new user and password? Any advice on what I am doing wrong? What is you preference: phpMyAdmin or yourSQL?

Thanks
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

I like phpMyAdmin (but have never used yourSQL) - perhaps the mysql user doesn't have the privileges required to create new databases? Do you log in as a different user for yourSQL?

Mac
davek
Forum Newbie
Posts: 12
Joined: Sat Mar 15, 2003 5:21 pm
Location: chicago

Post by davek »

The mysql user is the root user without a password (so in the config file the password is blank, i think thats rigth), should the root user have the privileges to create new dbs or do I need to set the privileges?

Would it be better to create a new user with the right privileges? Can i do that using phpMyAdmin?
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Do you use a different user to connect to youSQL as it seems strange that you are able to create databases in that but not in phpMyAdmin.

Mac
davek
Forum Newbie
Posts: 12
Joined: Sat Mar 15, 2003 5:21 pm
Location: chicago

Post by davek »

I am using the same user: mysql password: is blank, but i can only create dbs with test_ in front of them. ie: test_sunday.
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Have you tried connecting as user 'root'? If you want to add users and check their privileges click on the 'Privileges' link on your phpMyAdmin home page. You can also add users and check privileges using the command line:
http://www.mysql.com/doc/en/SHOW_GRANTS.html
http://www.mysql.com/doc/en/GRANT.html
http://www.mysql.com/doc/en/Default_privileges.html
http://www.mysql.com/doc/en/Adding_users.html

Mac
davek
Forum Newbie
Posts: 12
Joined: Sat Mar 15, 2003 5:21 pm
Location: chicago

Post by davek »

Thanks for your help Mac.

I tried using root, but got an error. Isnt root with no password created when the mysql is installed -- along with all priveleges. in phpMyAdmin the link for

Code: Select all

Create new database: їDocumentation]
No Privileges
are there, but not clickable

I followed this tutorial to get setup:
http://www.macromedia.com/devnet/mx/dre ... ntosh.html

thanks for the links. i have some reading to do.
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Did you do this step:
If you need to set up the password for the root account (this root account is the super user of MySQL database), enter:

/usr/local/mysql/bin/mysqladmin -u root password 'new-password'
because that's where you would've set the password for root.

Mac
davek
Forum Newbie
Posts: 12
Joined: Sat Mar 15, 2003 5:21 pm
Location: chicago

Post by davek »

I thought so, maybe that is where I screwed up. Can I go back to the terminal and re-set up the user using that line of code?
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Do you remember what you set the password as originally? 'cause then it's all a lot easier.

Mac
davek
Forum Newbie
Posts: 12
Joined: Sat Mar 15, 2003 5:21 pm
Location: chicago

Post by davek »

I think I set it to 'new-password'. Then realized later that 'new-password' was supposed to be whatever I wanted to use as a password.
davek
Forum Newbie
Posts: 12
Joined: Sat Mar 15, 2003 5:21 pm
Location: chicago

Post by davek »

I got it working! Thanks for your help Mac!!
Post Reply