简体   繁体   中英

Xampp/ Lampp Mysql access

I install on Ubuntu 16.04 LTE Xampp (lampp) all good It Works:

:~$ sudo /opt/lampp/lampp start
Starting XAMPP for Linux 5.6.20-0...
XAMPP: Starting Apache...already running.
XAMPP: Starting MySQL...ok.
XAMPP: Starting ProFTPD...already running.

:~$ sudo /opt/lampp/lampp status
Version: XAMPP for Linux 5.6.20-0
Apache is running.
MySQL is not running.
ProFTPD is running.

:~$ sudo service mysql start

:~$ sudo /opt/lampp/lampp status
Version: XAMPP for Linux 5.6.20-0
Apache is running.
MySQL is not running.
ProFTPD is running.

But when I want to enter the TERMINAL has mysql -u root:

ERROR 1698 (28000): Access denied for user 'root'@'localhost'

And if i use sudo mysql -u root, all is ok I can use mysql by terminal.

But for Firefox http://127.0.01/phpmyadmin/ :

Welcome to phpMyAdmin

Error

MySQL said: Documentation
Cannot connect: invalid settings.
Connection for controluser as defined in your configuration failed.
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.

我会检查/ var / lib和/ var / run下的权限我有类似的情况并通过更改这些文件夹的权限解决然后运行$。/ etc / init.d / mysql start

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