How to configure and use phpMyAdmin on Mac OS 】That’s it.
How to configure and use phpMyAdmin on Mac OS X:
1. Download Mac OS X
2. Open "web share" in "Settings" to start the Mac's own Apache. You can also restart Apache through sudo apachectl restart.
3. Put the source code into the directory specified by the DocumentRoot item in the Apache configuration file-httpd.cnf, and open the php5 module
#LoadModule php5_module libexec/apache2/libphp5.so
Change to:
LoadModule php5_module libexec/apache2/libphp5.so
4. Modify the access permissions of the phpmyadmin source code under DocumentRoot.
chmod -R 755 phpMyAdmin-4.4.1/
5. Configure Apache's httpd.conf as follows:
Options Indexes FollowSymLinks MultiViews AllowOverride all Order Deny,Allow Allow from all
6. In the phpMyAdmin-4.4.1 directory, copy config.example.inc.php and save it For:config.inc.php
, and modify part of its content:
$cfg['blowfish_secret'] = ''; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */ /* * Servers configuration */ $i = 0; /* * First server */ $i++; /* Authentication type */ $cfg['Servers'][$i]['user'] = 'root'; //mysql username here $cfg['Servers'][$i]['password'] = 'xxxx'; //mysql password here $cfg['Servers'][$i]['auth_type'] = 'config'; /* Server parameters */ $cfg['Servers'][$i]['host'] = 'localhost'; $cfg['Servers'][$i]['connect_type'] = 'tcp'; $cfg['Servers'][$i]['compress'] = false; $cfg['Servers'][$i]['AllowNoPassword'] = false;
7. You’re almost done! At this time, if you restart Apache through sudo apachectl restart and access it through the network address, you may still be prompted with an error:
mysql said: cannot connect: invalid settings.
This may be because phpmyadmin uses/var/mysql/mysql.sock
by default to connect to mysqld.
8. Create the default sock directory for phpmyadmin A link to the real sock.
8.1 sudo mkdir /var/mysql/ 8.2 sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock
Related tutorial recommendations:phpmyadmin
The above is the detailed content of How to configure and use phpMyAdmin on Mac OS X?. For more information, please follow other related articles on the PHP Chinese website!