So, lets install PhpMyAdmin. What is it? Why do I want to install it ?
PhpMyAdmin is a free and open source tool written in PHP intended to handle the administration of MySQL with the use of a web browser. It can perform various tasks such as creating, modifying or deleting databases, tables, fields or rows; executing SQL statements; or managing users and permissions.
First off, lets download PhpMyAdmin
Download PhpMyAdmin
Once you press download, a new page will apear telling you your download will start shortly. Wait for it to download and when complete open the .zip.
Extract the files into the root document directory of your web server (htdocs folder) and rename the folder to phpmyadmin.
Once extracted and renamed the first thing we have to do is set up your virtual hosts so it knows what your localhost is. To do this go to the conf folder in your Apache installation and edit the httpd.conf.
Scroll all the way down to the two virtual hosts we added previously. Lets add another.
<VirtualHost *:80>
ServerName localhost
DocumentRoot htdocs/
</VirtualHost>
This tells our server that when we type localhost, we want it to go to the htdocs folder and load the index page in there.
Save and close the file.
Once done that, the next thing we need to do is go back to the phpmyadmin folder, and inside the folder we need to make another folder called config.
Now, further down in the files portion of the folder you should see a file named:
config.sample.inc.php
Rename the file to:
config.inc.php
After you rename it, copy the file and paste it into the config folder we created.
The last thing we need to do before we can finish the setup and run PhPMyAdmin is to enable the extensions we need to use to access the database.
Go to where you installed PHP, and search for the file named :
php.iniOpen the file and press CTRL + F and search for extension and keep searching until you see a bunch that look like this (I have circled the two in red that we will uncomment) :
Delete the semicolon before the two lines that are circled above. They are mbstring.dll and mysqli.dll.
Save and close the file.
Restart your Apache server and open a browser. Type localhost/phpmyadmin/setup and you should come to a page that looks similar to this :
Click Save (located on the bottom bar)
Now go back to your phpmyadmin folder, go inside the config folder and copy your config.inc.php . Once copied, paste it into your phpmyadmin root folder and delete the config folder we created.
Now that that is all done..... go to localhost/phpmyadmin and enter the username and password you created in the MySQL tutorial (not the root username and password).
Congratulations, now you can start manipulating that data.
Stay tuned for my next post on How To : Install and FTP Server and Create Two Users.
Thanks for reading
No comments:
Post a Comment