In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
Mysql and php errors and solutions, in view of this problem, this article introduces the corresponding analysis and solutions in detail, hoping to help more partners who want to solve this problem to find a more simple and easy way.
These two days in the configuration of the snort+base environment, involving the installation and configuration of apache, mysql and php. Although there are a lot of information about this on the Internet, due to the different personalized configuration of the servers used, copying other people's installation steps can not be successful. Due to the first time to build these basic software at the same time, we still encountered a lot of problems and found a lot of information. In the process of solving the problem, I have a better understanding of open source system services.
[@ more@]
Problem 1: accidentally delete the mysql.sock file of mysql. The default database file is corrupted, resulting in the following error when running mysqld_safe to start the database
Starting mysqld daemon with databases from / var/lib/mysql
STOPPING server from pid file / var/run/mysqld/mysqld.pid
070722 11:07:31mysqld ended
Try to connect. Mysql-uroot-p prompts you when connecting:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket'/ var/lib/mysql/mysql.sock'
The solution is to rebuild the data with mysql_install_db, and then
/ usr/libexec/mysqld-defaults-file=/etc/my.cnf-basedir=/usr-datadir=/var/lib/mysql-user=root-pid-file=/var/run/mysqld/mysqld.pid-skip-locking-socket=/var/lib/mysql/mysql.sock
Problem 2: when you visit the php page, you find that only the header is displayed, and the following php code is unresponsive.
There is no output.
After looking at apache's log, it is found that php has written in warning and some error information, indicating that apache can interact with php. That should be the problem of php configuration. Open the php.ini file and change the two variables to error_reporting = E_ALL & ~ E_NOTICE and display_errors = On. This time you can print a lot of information.
Then modify the configuration file httpd.conf of apache, and add
Php_flag display_errors on
Php_value error_reporting 2039
Service httpd restart, and then visit the original php file, clattered several errors ran out, this mood relaxed, the original error php does not continue to analyze, the error message is also hidden.
These two options are useful for high-level code, but the release should turn it off, otherwise it will reveal a lot of secrets ^ _ ^
This is the answer to the mistakes and solutions of mysql and php. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel for more related knowledge.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.