mysqli_sql_exception: No such file or directory
i have an error when I access to PHPMyAdmin
" mysqli_sql_exception: No such file or directory"
then I try to re-install MySQL by using this command
# sudo apt-get install php8.0-mysql
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package php8.0-mysql
E: Couldn't find any package by glob 'php8.0-mysql'
E: Couldn't find any package by regex 'php8.0-mysql'
== and try another one
# sudo apt-get install php8.0-mbstring
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package php8.0-mbstring
E: Couldn't find any package by glob 'php8.0-mbstring'
E: Couldn't find any package by regex 'php8.0-mbstring'
and try to provision php profile package but the problem still appear
-
Hey there! Those commands wouldn't reinstall MySQL on a server, and even if they did work they would not be necessary on a cPanel machine. Can you let me know what errors you get when you try and access PHPMyAdmin? Do you see any additional details in the cPanel log at /usr/local/cpanel/logs/error_log?
0 -
Errors i get when i try to access PHPMyAdmin
" mysqli_sql_exception: No such file or directory"
- Additional details in the cPanel log
[2024-06-21 10:30:03 +0200] warn [cpses_tool] Error while connecting to MySQL: (XID adk59f) The system failed to connect to the “MySQL” database “mysql” because of an error: CR_CONNECTION_ERROR (Can't connect to local server through socket '/var/lib/mysql/mysql.sock' (2))
Error while connecting to MySQL: (XID adk59f) The system failed to connect to the “MySQL” database “mysql” because of an error: CR_CONNECTION_ERROR (Can't connect to local server through socket '/var/lib/mysql/mysql.sock' (2)) at /usr/local/cpanel/Cpanel/Mysql/Basic.pm line 437.0 -
Thanks for those details. Are you able to restart MySQL normally with the /scripts/restartsrv_mysqld command?
0 -
No i get this error when i try the command
-bash: /scripts/restartsrv_mysqld: No such file or directory0 -
Ah, try it without the "d" on the end:
/scripts/restartsrv_mysql
0 -
I try it without the "d"
And I get that# /scripts/restartsrv_mysql
Waiting for “mysql” to start ……info [restartsrv_mysql] systemd failed to start the service “mysql” (The “/usr/bin/systemctl restart mysql.service --no-ask-password” command (process 168703) reported error number 1 when it ended.): Job for mysql.service failed because the control process exited with error code.
See "systemctl status mysql.service" and "journalctl -xeu mysql.service" for details.
…info [restartsrv_mysql] systemd failed to start the service “mysql” (The “/usr/bin/systemctl restart mysql.service --no-ask-password” command (process 168771) reported error number 1 when it ended.): Job for mysql.service failed because the control process exited with error code.
See "systemctl status mysql.service" and "journalctl -xeu mysql.service" for details.
…info [restartsrv_mysql] systemd failed to start the service “mysql” (The “/usr/bin/systemctl restart mysql.service --no-ask-password” command (process 168845) reported error number 1 when it ended.): Job for mysql.service failed because the control process exited with error code.
See "systemctl status mysql.service" and "journalctl -xeu mysql.service" for details.
…failed.
Cpanel::Exception::Services::StartError
Service Status
undefined status from Cpanel::ServiceManager::Services::Mysql
Service Error
(XID tm6t7q) The “mysql” service failed to start.
mysql has failed. Contact your system administrator if the service does not automagically recover.0 -
Well that's not good - do you see any additional details in the MySQL log or the journal log mentioned?
0 -
Same problem here. Any solution?
Update --> I restored the server to an older image, then everything works fine, but after some hours again the mysql service was removed or something, do you now if this is an attack or something, is very strange. Then i check the mysqld.log and i have this:
2024-07-03T15:49:53.061070Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.38) starting as process 1042057
2024-07-03T15:49:53.073358Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2024-07-03T15:49:55.864788Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2024-07-03T15:49:56Z UTC - mysqld got signal 11 ;
Most likely, you have hit a bug, but this error can also be caused by malfunctioning hardware.
BuildID[sha1]=539914406f129270c6bd39a48640d0f1eeecc1af
Thread pointer: 0x0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 0 thread_stack 0x100000
/usr/sbin/mysqld(my_print_stacktrace(unsigned char const*, unsigned long)+0x41) [0x213f031]
/usr/sbin/mysqld(print_fatal_signal(int)+0x397) [0xffa557]
/usr/sbin/mysqld(handle_fatal_signal+0xa5) [0xffa615]
/lib64/libpthread.so.0(+0x12d20) [0x7f35c138ed20]
/usr/sbin/mysqld(Validate_files::check(__gnu_cxx::__normal_iterator<dd::Tablespace const* const*, std::vector<dd::Tablespace const*, std::allocator<dd::Tablespace const*> > > const&, __gnu_cxx::__normal_iterator<dd::Tablespace const* const*, std::vector<dd::Tablespace const*, std::allocator<dd::Tablespace const*> > > const&, unsigned long)+0x909) [0x218ddb9]
/usr/sbin/mysqld(std::thread::_State_impl<std::thread::_Invoker<std::tuple<Detached_thread, std::function<void (__gnu_cxx::__normal_iterator<dd::Tablespace const* const*, std::vector<dd::Tablespace const*, std::allocator<dd::Tablespace const*> > > const&, __gnu_cxx::__normal_iterator<dd::Tablespace const* const*, std::vector<dd::Tablespace const*, std::allocator<dd::Tablespace const*> > > const&, unsigned long)>, __gnu_cxx::__normal_iterator<dd::Tablespace const* const*, std::vector<dd::Tablespace const*, /lib64/libstdc++.so.6(+0xc2b23) [0x7f35c010fb23]
/lib64/libpthread.so.0(+0x81ca) [0x7f35c13841ca]
/lib64/libc.so.6(clone+0x43) [0x7f35bf7168d3]
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.
2024-07-03T15:49:56.551600Z 0 [Warning] [MY-010918] [Server] 'default_authentication_plugin' is deprecated and will be removed in a future release. Please use authentication_policy instead.The problem apparently is related to a crash inside mysql, im still figuring out what is going on.
1 -
I am also experiencing the same problem. Can we present a step-by-step guide to resolve this?
0
Please sign in to leave a comment.
Comments
9 comments