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.

5 ★ | 1 Vote

May be interested

  • 11 best MySQL monitoring tools for adjusting and managing SQL Server performance11 best MySQL monitoring tools for adjusting and managing SQL Server performance
    today, tipsmake.com will review the leading mysql (sql) software and performance management tools, helping you manage sql servers, as well as adjusting their performance and speed.
  • Instructions on how to connect to MySQL Server in IntelliJInstructions on how to connect to MySQL Server in IntelliJ
    how to connect mysql server in intellij? detailed instructions on how to connect to mysql server in intellij, it is time to quit mysql workbench
  • How to Install XAMPP on LinuxHow to Install XAMPP on Linux
    this wikihow teaches you how to install and run xampp on a linux computer. open the xampp download page. go to https://www.apachefriends.org/index.html in your computer's web browser. this is the official download site for xampp.
  • 5 best XAMPP alternatives for local website hosting5 best XAMPP alternatives for local website hosting
    here are the best xampp alternatives that you can try. who knows, you might be able to pick up a few new skills from these recommended toolkits.
  • How to Learn PHP and MySQLHow to Learn PHP and MySQL
    php is one of the most widely-used programming languages on the internet, and it allows you to do much more than simple html. mysql allows you to easily create and modify databases on your server. used together, these tools can create...
  • Instructions on how to install Xampp software on Windows 10Instructions on how to install Xampp software on Windows 10
    instructions on how to install xampp software on windows 10 operating systems to create virtual servers. link to download the latest xampp software ...
  • How to Install the MySQL Database Server on Your Windows PCHow to Install the MySQL Database Server on Your Windows PC
    this wikihow teaches you how to install the mysql server program on a windows 10 computer. in order to install mysql on a windows computer, you must first have python 2.7 (not python 3+) installed. open the python download page. go to...
  • Compare the performance of MongoDB and SQL Server 2008Compare the performance of MongoDB and SQL Server 2008
    in the following article, we will point out the difference in performance of the relatively new database management system, which is mongodb and one of the popular systems like sql server (mysql or oracle). most of the data is given here in the form of charts, so we can easily imagine the advantages and disadvantages of mongodb as well as other database management systems.
  • 9 Steps to Install SSL for Xampp in Most Detail9 Steps to Install SSL for Xampp in Most Detail
    installing ssl for xampp is an important task to protect information and data during web development.
  • Malware stored in Google Sites sends data to the MySQL serverMalware stored in Google Sites sends data to the MySQL server
    recently, security researchers have found some malware hosted on the google sites platform to build on websites. however, the real threat lies in the fact that a fraudster who steals information can take advantage of this flaw to send the victim's data to their own controlled mysql server simply and quickly. .