使用mysqlhotcopy 物理增量备份
我们只需要使用ldconfig 指定路径即可,下面安装MySQL-shared-compat-5.0.95-1.glibc23.x86_64.rpm包则可跳过#ldconfig /usr/loc
MySQL版本是5.1.49
# uname -a
Linux loDB192168000046 2.6.18-238.19.1.el5 #1 SMP Fri Jul 15 07:31:24 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux
# cat /etc/issue
CentOS release 5.6 (Final)
Kernel \r on an \m
# mysqlhotcopy -u root -p '密码' 数据库名 备份目录
Can't locate DBI.pm in @INC (@INC contains: /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 .) at bin/mysqlhotcopy line 8.
BEGIN failed--compilation aborted at bin/mysqlhotcopy line 8.
上面出错是因为perl-DBD-mysql未安装:
# rpm -qa | grep perl-DBD
下载并安装perl-DBD-mysql提示缺少"libmysqlclient.so.15":
# rpm -ivh perl-DBD-MySQL-3.0007-2.el5.x86_64.rpm
error: Failed dependencies:
libmysqlclient.so.15()(64bit) is needed by perl-DBD-MySQL-3.0007-2.el5.x86_64
libmysqlclient.so.15(libmysqlclient_15)(64bit) is needed by perl-DBD-MySQL-3.0007-2.el5.x86_64
perl(DBI) is needed by perl-DBD-MySQL-3.0007-2.el5.x86_64
看看 libmysqlclient.so.15这个文件是否存在
# locate libmysqlclient.so.15
/usr/local/mysql/lib/mysql/libmysqlclient.so.15
/usr/local/mysql/lib/mysql/libmysqlclient.so.15.0.0
结果显示libmysqlclient.so.15文件是有的, 只是不在/usr/lib目录下而已:
我们只需要使用ldconfig 指定路径即可,下面安装MySQL-shared-compat-5.0.95-1.glibc23.x86_64.rpm包则可跳过
#ldconfig /usr/local/mysql/lib/mysql
因为我的版本是5.1.49, 其实是有libmysqlclient的,但版本为locate libmysqlclient.so.16
# locate libmysqlclient.so.16
/usr/local/mysql-5.1.49-linux-x86_64-glibc23/lib/libmysqlclient.so.16
/usr/local/mysql-5.1.49-linux-x86_64-glibc23/lib/libmysqlclient.so.16.0.0
那我们使用MySQL-shared-compat 的rpm包:
下载MySQL-shared库文件, 下载地址:
先查包里面是否有libmysqlclient.so.15这个文件
# rpm -qilp MySQL-shared-compat-5.0.95-1.glibc23.x86_64.rpm
...
/usr/lib64/libmysqlclient.so
/usr/lib64/libmysqlclient.so.12
/usr/lib64/libmysqlclient.so.12.0.0
/usr/lib64/libmysqlclient.so.14
/usr/lib64/libmysqlclient.so.14.0.0
/usr/lib64/libmysqlclient.so.15
/usr/lib64/libmysqlclient.so.15.0.0
/usr/lib64/libmysqlclient_r.so
/usr/lib64/libmysqlclient_r.so.12
/usr/lib64/libmysqlclient_r.so.12.0.0
/usr/lib64/libmysqlclient_r.so.14
/usr/lib64/libmysqlclient_r.so.14.0.0
/usr/lib64/libmysqlclient_r.so.15
/usr/lib64/libmysqlclient_r.so.15.0.0
/usr/lib64/libndbclient.so
/usr/lib64/libndbclient.so.2
/usr/lib64/libndbclient.so.2.0.0
从执行结果上看是有的,,安装此rpm包 可以彻底解决关于类似 libmysqlclient.so 的问题。
# rpm -ihv MySQL-shared-compat-5.0.95-1.glibc23.x86_64.rpm
更新一下文件树库, 然后此时就会看到libmysqlclient.so.15在/usr/lib64目录下也有一份:
# updatedb
# locate libmysqlclient.so.15
/usr/lib64/libmysqlclient.so.15
/usr/lib64/libmysqlclient.so.15.0.0

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics











The main role of MySQL in web applications is to store and manage data. 1.MySQL efficiently processes user information, product catalogs, transaction records and other data. 2. Through SQL query, developers can extract information from the database to generate dynamic content. 3.MySQL works based on the client-server model to ensure acceptable query speed.

Laravel is a PHP framework for easy building of web applications. It provides a range of powerful features including: Installation: Install the Laravel CLI globally with Composer and create applications in the project directory. Routing: Define the relationship between the URL and the handler in routes/web.php. View: Create a view in resources/views to render the application's interface. Database Integration: Provides out-of-the-box integration with databases such as MySQL and uses migration to create and modify tables. Model and Controller: The model represents the database entity and the controller processes HTTP requests.

MySQL and phpMyAdmin are powerful database management tools. 1) MySQL is used to create databases and tables, and to execute DML and SQL queries. 2) phpMyAdmin provides an intuitive interface for database management, table structure management, data operations and user permission management.

I encountered a tricky problem when developing a small application: the need to quickly integrate a lightweight database operation library. After trying multiple libraries, I found that they either have too much functionality or are not very compatible. Eventually, I found minii/db, a simplified version based on Yii2 that solved my problem perfectly.

Compared with other programming languages, MySQL is mainly used to store and manage data, while other languages such as Python, Java, and C are used for logical processing and application development. MySQL is known for its high performance, scalability and cross-platform support, suitable for data management needs, while other languages have advantages in their respective fields such as data analytics, enterprise applications, and system programming.

Article summary: This article provides detailed step-by-step instructions to guide readers on how to easily install the Laravel framework. Laravel is a powerful PHP framework that speeds up the development process of web applications. This tutorial covers the installation process from system requirements to configuring databases and setting up routing. By following these steps, readers can quickly and efficiently lay a solid foundation for their Laravel project.

The basic operations of MySQL include creating databases, tables, and using SQL to perform CRUD operations on data. 1. Create a database: CREATEDATABASEmy_first_db; 2. Create a table: CREATETABLEbooks(idINTAUTO_INCREMENTPRIMARYKEY, titleVARCHAR(100)NOTNULL, authorVARCHAR(100)NOTNULL, published_yearINT); 3. Insert data: INSERTINTObooks(title, author, published_year)VA

When developing an e-commerce website using Thelia, I encountered a tricky problem: MySQL mode is not set properly, causing some features to not function properly. After some exploration, I found a module called TheliaMySQLModesChecker, which is able to automatically fix the MySQL pattern required by Thelia, completely solving my troubles.
