In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
One of the biggest changes from PHP5,PHP7 is the removal of the MySQL extension. It is recommended to use mysqli or pdo_mysql. In fact, starting with PHP5.5, PHP begins to prepare to abandon the mysql extension. If you use the mysql extension, you may have seen the prompt "Deprecated: mysql_connect (): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in". Therefore, in future programs, in order to maintain compatibility, we should minimize the use of mysql extensions for database connections.
As an operation and maintenance staff, not only want to use PHP7 to improve the efficiency of the server, but also to ensure that the old programs can run, how to do?
1. Download the mysql extension, http://Git.php.NET/?p=pecl/database/mysql.git;a=summary, on the php website
two。 Extract and initialize using the phpize tool, compile:
# decompression
Tar xzvf mysql-45881bd.tar.gz
# enter the mysql extension directory from www.mfbuluo.com
Cd mysql-45881bd/
# initialize using phpize, and my phpize is in / opt/ directory
/ opt/php/bin/phpize
# compile the mysql extension and use mysql native driver as the mysql link library
. / configure-with-php-config=/opt/php/bin/php-config-with-mysql=mysqlnd
Make & & make install
3. Next, we edit the php.ini file directly, copy the mysql.so to the extension_dir of php.ini, and then add extension=mysql.so to the php.ini
4. Restart php
After success, you can see the information of the mysql extension with phpinfo:
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.