Home > Database > phpMyAdmin > body text

How to configure and use phpMyAdmin on Mac OS X?

coldplay.xixi
Release: 2020-07-20 13:40:59
Original
2982 people have browsed it

How to configure and use phpMyAdmin on Mac OS 】That’s it.

How to configure and use phpMyAdmin on Mac OS X?

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
Copy after login

Change to:

LoadModule php5_module libexec/apache2/libphp5.so
Copy after login

4. Modify the access permissions of the phpmyadmin source code under DocumentRoot.

chmod -R 755 phpMyAdmin-4.4.1/
Copy after login

5. Configure Apache's httpd.conf as follows:

<Directory "/Library/WebServer/Documents/phpMyAdmin-4.4.1">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Allow from all
</Directory>
Copy after login

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[&#39;blowfish_secret&#39;] = &#39;&#39;; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
 
/*
* Servers configuration
*/
$i = 0;
 
/*
* First server
*/
$i++;
/* Authentication type */
$cfg[&#39;Servers&#39;][$i][&#39;user&#39;] = &#39;root&#39;; //mysql username here
$cfg[&#39;Servers&#39;][$i][&#39;password&#39;] = &#39;xxxx&#39;; //mysql password here
$cfg[&#39;Servers&#39;][$i][&#39;auth_type&#39;] = &#39;config&#39;;
 
/* Server parameters */
$cfg[&#39;Servers&#39;][$i][&#39;host&#39;] = &#39;localhost&#39;;
$cfg[&#39;Servers&#39;][$i][&#39;connect_type&#39;] = &#39;tcp&#39;;
$cfg[&#39;Servers&#39;][$i][&#39;compress&#39;] = false;
$cfg[&#39;Servers&#39;][$i][&#39;AllowNoPassword&#39;] = false;
Copy after login

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
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!