简体   繁体   中英

MySQL ERROR 1045 (28000)

Recently i installed LAMP on Linux Mint. I successfully installed it and now just run this commands on terminal for checking the version :

apache2 -v
php -v
mysql -v

This is the result :

2016-10-22 13:45:33 |斯皮德夫

I dont have any problem with localhost because now i'm running phpinfo() function correctly and localhost (apache and php) is ok. but for database is that :

in orther to instal phpmyadmin you need to install mysql before cotinunig

so it said that MySQL is needed. as you see i had installed mySQL before and now i have problem with checking the version.

im trying to config phpmyadmin but here is:

2016-10-22 13:49:40 |斯皮德夫

so i think this is the cause of mySQL.

what is the problem ?

As the mysql extension is not part of a default PHP7 installation anymore ( http://php.net/manual/de/mysql.php ), you need to install it with

sudo apt-get install php-mysql

This should install and activate the mysql drivers. You will have to restart apache afterwards by

sudo service apache2 restart

If you have already the mysql package installed, check the php.ini under /etc/php/7.1/apache2/php.ini for the line

extension=mysql.so

Maybe phpmyadmin works with mysqli ( extension=mysqli.so ) too.

To install php7 and php5 in parallel, check out this guide:

http://lornajane.net/posts/2016/php-7-0-and-5-6-on-ubuntu

I have already solved this problem by searching for a long time. Everytime for the first time you use mysql after you turn on the computer,you should execute the following sentence:

net start mysql80

80 is mysql's version. Remember:you should run the cmd with administrator privileges

Best wishes!

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