I'm running my server on localhost. I'm trying to make a forum database program in php, but I can't get mysql to work! whenever I try to add a table, it says there isn't any database. How do I add a database to localhost?

Thanks in advanced for your help.

13 Years
Discussion Span
Last Post by tdoyle


Per their website : phpMyAdmin is a tool written in PHP intended to handle the administration of MySQL over the Web. Currently it can create and drop databases, create/drop/alter tables, delete/edit/add fields, execute any SQL statement, manage keys on fields, manage privileges,export data into various formats and is available in 50 languages.

I use this tool, you can create new databases, work with your tables and such.. You did not mention what versions of PHP and MySQL you are working with. Just create a dir in your webservices dir.. ( ie c:\apache\htdocs\phpmyadmin ), and place the files there.. You should have MySQL already running .. you can also use the MySQL Admin tool from the MySQL website ( See Above link ).


First, make sure that mysql is actually listening on localhost (
You may be connecting over your public IP.

If you want to test running mysql only on localhost, this quick howto shows you
what to put in your /etc/my.cnf


Edited by happygeek: link snipped

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.