How to Create a MySQL Database with phpMyAdmin

Jose Simpton

You will require a root or DBA user login to the MySQL server, or a user login with permission to create new databases.

You will need to have access to an instance of phpMyAdmin appropriately configured to administrate the MySQL server.

If you require a dedicated web server running MySQL and phpMyAdmin please visit our Web Hosting Services page.

Using phpMyAdmin Version 3.5.1¶

Select, Insert, Update, Delete, Create, Alter, Index, Drop, Create Temporary Tables, Lock Tables

Testing Your User Login¶

NOTE: phpMyAdmin must be configured in the default cookie authentication mode to be able to login to MySQL server with any username.

phpMyAdmin is a popular web-based administration tool used to administrate MySQL servers and databases. This tutorial illustrates how to create a new database and a new user to access that database on a MySQL Server using phpMyAdmin.Browse to your phpMyAdmin URL using your Internet Web Browser, and login using youroruser login as shown.From the main menu chooseIn the create database field type in a name for your database. Leave the collation drop down box if you wish to use the default MySQL schema collation. ClickYour database will now be visible on the right hand side under the list of available databases. To setup a new user login to access this database, click onin the main menu. Choose theoption under the list of available server users.In the section titled- type in aand ain the fields as shown. Optionally you can press thebutton to create a random password for you.The section that relates to the users GLOBAL privileges are privileges you want to assign to this user which apply toon the server. It is recommended that you doassign these permissions unless you know exactly what you are doing. It is far more secure to assign seperate user logins to each piece of software or website that will require access to only a. Therefore leave this section, and then click thebutton.After the user is created, you can see it listed on the Users page. Clickto assign access to a specific database.Once again leave the Global Privileges section. Scroll down to the section titled. Choose theyou want the user to be able to access from the list, and clickAssign the permissions as shown to provide the user with access to the given database. The following permissions are recommended for compatibility with most modern web-based software applications.Clickafter selecting the relevant privileges.If you click on the users Edit Privileges option now, you will see that new privileges for the specific database are now listed as belonging to the user.Click the Logout option in the top left corner, and test your new user login with phpMyAdmin.Test your new user login by using it to login to phpMyAdmin.If you can only your new database in the list of schema's on the left then your new database and username is most likely ready for use.