简体   繁体   中英

Can't access Phpmyadmin in ubuntu error mysqli_real_connect(): (HY000/2002)

i tried to access phpmyadmin but this thing happen

 MySQL said: Documentation

 Cannot connect: invalid settings.
 mysqli_real_connect(): (HY000/2002): No such file or directory
 Connection for controluser as defined in your configuration failed.
 mysqli_real_connect(): (HY000/2002): No such file or directory
 phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should 
 check the host, username and password in your configuration and make sure that they correspond to 
 the information given by the administrator of the MySQL server.

apache and mysql is running and my website has error like this

Warning: session_start(): open(/opt/lampp/temp//sess_ku01nv1mbiroo8btvpbqjv47f7, O_RDWR) failed: Permission denied (13) in /opt/lampp/htdocs/sisfo/index.php on line 2

does anyone know how to fix this?

mysqli_real_connect(): (HY000/2002): No such file or directory

Seems like phpmyadmin tries to connect to the mysql socket (which doesn't exist?). You could try to change the host in your config.inc.php from localhost to 127.0.0.1 .


Warning: session_start(): open(...) failed: Permission denied (13)

You probably have wrong permission/ownership for the temporary folder. Try these commands in your shell:

chmod 777 /opt/lampp/temp
chown -R 33:33 /opt/lampp/temp

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM