• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Problem connect Mysql

  • Thread starter passawut treesittichai
  • Start date
P

passawut treesittichai

Guest
Hello,

Information
Window server 2003
Plesk window 8.6.0.5

When have a problem mysql. I can't access to CP Plesk or Website have connect Mysql. It's show error below.

1. Error for CP Plesk
Warning: db_query() [function.db-query]: Couldn't fetch mysqli in E:\Program Files\Parallels\Plesk\admin\plib\common_func.php3 on line 229
ERROR: PleskMainDBException DB query failed: Unknown error 0: plib\common_func.php3:243 db_query(string 'set names utf8') 1: plib\common_func.php3:649 reconnect() 2: plib\common_func.php3:614 db_connect() 3: auto_prepend\auth.php3:80

2. Error for Website
Mysql does not connect

I get restart All service but It's not work.
I must reboot server only to be normal.

Please help me.
Thank you
 
Check my.ini file that is used by MySQL server engine serving Plesk database.
Make sure that there is correct 'MySQL' in line:

datadir=C:\\Program Files\\SWsoft\\Plesk\\MySQL\\Data

Also make sure that password for admin user in user MySQL table is correct.
 
Last edited:
I have check my.ini is correct

[MySQLD]
port=3306
basedir=E:\\Program Files\\Parallels\\Plesk\\Databases\\MySQL
datadir=E:\\Program Files\\Parallels\\Plesk\\Databases\\MySQL\\Data

This a problem It not happen all the time. When mysql not work. I have test restart service and Plesk reconfiguretor tools but not work. I must reboot server only.

I suspect from error why it fetch mysqli?

Can I check password for admin user in user Mysql?

Thank you
 
For connection to MySQL server and databases you should use some account with corresponding password. Usually it is admin account or root. I dont know name and password of this account in your case. So, can you connect to MySQL server with this account and password? I have suggested to check it in 'user' MySQL table, because this account located there.
 
Now. Mysql not work, I can't connect mysql from %plesk_dir%/Mysql/bin/mysql.exe -P8306 -uadmin -p while Service Mysql is start at Plesk service monitor but if I reboot server. I will connect mysql.

and no log in event viewer.

Please help me.
 
Sorry. Is Mysql service correctly started when you try to connect with login and password to MySQL server? Or you can't connect because you can't start MySQL service? What sort of errors in this case? Is there any errors after attempt to start MySQL service?
 
Normally, Mysql is work but sometime I can't connect Mysql so not access web, CP Plesk and show this error.

Warning: db_query() [function.db-query]: Couldn't fetch mysqli in E:\Program Files\Parallels\Plesk\admin\plib\common_func.php3 on line 229
ERROR: PleskMainDBException DB query failed: Unknown error 0: plib\common_func.php3:243 db_query(string 'set names utf8') 1: plib\common_func.php3:649 reconnect() 2: plib\common_func.php3:614 db_connect() 3: auto_prepend\auth.php3:80

I don't know what caused that.
 
Did you switched database for Plesk from Jet to MySQL with something like?

reconfigurator --switch-plesk-database --new-provider=MySQL --host=localhost --db=psa --login=admin --password=xxxx

If it is true, seems problem in that --port option was missed and there is empty value for MySQL_DB_PORT in registry.
Please check it and fill it with 3306 default MySQL port.
 
I have to wait for a problem Mysql before it and I update to you

By Default MySQL_DB_Port in registry. It use MySQL port 8306 or not.
 
Hi There,

did you fix this problem.
i have the same problem happening when i login to plesk i get

Warning: db_query() [function.db-query]: Couldn't fetch mysqli in C:\Program Files\SWsoft\Plesk\admin\plib\common_func.php3 on line 229
ERROR: PleskMainDBException DB query failed: Unknown error 0: plib\common_func.php3:243 db_query(string 'set names utf8') 1: plib\common_func.php3:649 reconnect() 2: plib\common_func.php3:614 db_connect() 3: auto_prepend\auth.php3:80

and when i check the websites with mysql database it says

Unable to connect to mysql

please help i've been trying to solve this long time ago.
 
Hi There,

do you have any updates here??? did you fix this problem?? if yes .. How???

please update....
 
Same problem

I have same problem,

please help me too!

send a solution for this problem.
 
Error while remove client.

I am getting following error while remove a client in Plesk Control Panel 8.6.

Warning: db_query() [function.db-query]: Couldn't fetch mysqli in C:\Program Files\SWsoft\Plesk\admin\plib\common_func.php3 on line 229
ERROR: PleskMainDBException DB query failed: Unknown error 0: plib\common_func.php3:243 db_query(string 'set names utf8') 1: plib\common_func.php3:649 reconnect() 2: plib\common_func.php3:614 db_connect() 3: auto_prepend\auth.php3:80

Any help highly appreciated.

Thanks,

IKAN
 
Plesk 8.0.6
SQL 2005 Workgroup
Windows 2003 Server Standard

All database sites stop working, both MySQL and MS SQL Stop connecting and solution is to restart the IIS even restart of MySQL MS SQL does not help, only restart of IIS fix the issue.

What is the reason ? How to fix?

Plesk Shows following error when issue appears:
Warning: db_query() [function.db-query]: Couldn't fetch mysqli in C:\Program Files (x86)\SWsoft\Plesk\admin\plib\common_func.php3 on line 229
ERROR: PleskMainDBException DB query failed: Unknown error 0: plib\common_func.php3:243 db_query(string 'set names utf8') 1: plib\common_func.php3:649 reconnect() 2: plib\common_func.php3:614 db_connect() 3: auto_prepend\auth.php3:80


Websites of MS SQL Shows following error:

Microsoft OLE DB Provider for SQL Server error '80004005'

[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.

For Mysql sites I will write the exact error after few hours as I am waiting for it
 
Back
Top