MySQL is one of the most popular open-source database options for Web designers. Programmed using Server Query Language (SQL), MySQL is used to store a large assortment of information, including everything from product inventories to user profile data. Designers use a server-side scripting language, such as Hypertext Preprocessor (PHP) or Active Server Pages (ASP), to retrieve information from and insert information into a database. To begin, designers must specify the name of the server that hosts the database. Discovering the server's name is an easy process.
Access your database with "localhost" as the server name. "Localhost" is the most common server name for MySQL databases, especially if you are hosting the database on your own server or if your PHP code shares the same server as your database.
Search the MySQL section of PHPMyAdmin. You can access PHPMyAdmin through your web host's CPanel. Server information for your database, including the server name, is at the top-left corner.
Contact your web host for your sever name. Sometimes web hosts use unique configurations. If your web host supports MySQL, yet you are unable to connect to your database, it is most likely a unique configuration.
Tips & Warnings
- Connecting to a database requires a username and password. Most Web hosts allow you to make a username and password, but some assign one to you. If you are unsure of your username or password, contact your Web host.
- Photo Credit Ryan McVay/Photodisc/Getty Images