Access applications directly to XAMPP MySQL Server
TipsMake.com - In this article use the Linux operating system Ojuba 2 - 1 based on Fedora 10 framework framework, the user account here is root and suspend all operations of the MySQL database server :
/etc/init.d/mysqld stop
If you want to use the full function of the LAMP server with just one step, XAMPP is a great solution, but you will not be able to access the MySQL database server using mysql client as usual (/ usr / bin / mysql) , but instead, you must use the bundled client application (/ opt / lampp / bin / mysql).
And here are some problems that users often encounter, they have several databases, code snippets and other applications that need access to this database with the mysql client function (/ usr / bin / mysql) is the default mode, but there is no option to change all of the application's source code points to the XAMPP client.
First solution:
Move mysql client entry (/ usr / bin / mysql):
mv / usr / bin / mysql /usr/bin/mysql.original
Then create a dynamic link to the XAMPP client (/ opt / lampp / bin / mysql) in the same position as follows:
ln -s / opt / lampp / bin / mysql / usr / bin / mysql
Second solution:
In this method, we will work directly with the sock file, which is responsible for pointing activities directly to the database server. XAMPP regularly saves sock files in the following location:
/opt/lampp/var/mysql/mysql.sock
But for applications in the system, the following method must be applied:
/var/run/mysqld/mysqld.sock
In order for all programs to use the XAMPP database server, we must specify these programs to point to the XAMPP file, or simply, create a link to the XAMPP file in a separate address. Therefore, every program that wants to access the database server must point to the XAMPP server. Use the following command:
ln -s /opt/lampp/var/mysql/mysql.sock /var/mysql/mysql.sock
After executing this step, the applications are now able to operate, directly accessing the normal database without any hindrance.
You should read it
- Download XAMPP 8.0.2: Free local Web server
- SQL Server setup is always available
- Compare the performance of MongoDB and SQL Server 2008
- How to install and configure MySQL server on Pi
- Guide to creating Virtual Hosting with PureFTPd and MySQL
- Instructions for installing MySQL on Windows and remote access
- How to create a database in MySQL
- Instructions on how to connect to MySQL Database in Eclipse
- Backup and restore MySQL with mysql-zrm on Debian Sarge
- Learn about the role concept in SQL Server
- How to install XAMPP, How to configure XAMPP on Windows 10
- How to recover the database in MS SQL Server
Maybe you are interested
Instructions on how to install MySQL on Windows 11 computers
Best tools for designing and administering Mysql databases
Steps to Import data from different tables in MySQL Workbench
Instructions on how to connect to MySQL Server in IntelliJ
Instructions on how to connect to MySQL Database in Eclipse
How to install MySQL Workbench Community Edition on Windows 10