Learning Mysql


Configuring a Newly Installed Server



Download 4.24 Mb.
View original pdf
Page48/366
Date04.08.2023
Size4.24 Mb.
#61806
1   ...   44   45   46   47   48   49   50   51   ...   366
Learning MySQL
Configuring a Newly Installed Server
Once you’ve installed the server, there are some steps you should take to initialize the database tables and configure the server for good security. One of the first things to do is to set a password for the database root account this is not the same as the system
Installing Under Linux | 45

root account but is similar in that it has all privileges on the MySQL server. Let’s look at three situations You’ve installed the server using RPM or Debian packages You’ve installed a system-wide server using a tarball or by compiling source code You’ve installed a local server to run under your own account using a tarball or by compiling source code.
As we explained earlier, the XAMPP package is tightly integrated and is not designed for easy modification, so we won’t explore how to customize an XAMPP installation.
Configuring a server installed using RPM or Debian packages
The package installation process generally places the MySQL program files in the /usr/
bin directory, the datafiles in the /var/lib/mysql directory, and the server logs in the /var/log/mysqld directory or the /var/log/mysqld.log file.
The installation typically configures the files and directories securely and also creates the /etc/init.d/mysql or /etc/init.d/mysqld (MySQL daemon) startup script for easy control of the server.
Check what this script is called on your system using the ls command ls /etc/init.d/mysql*
/etc/init.d/mysql
In the preceding example, the file is called mysql
. Use the appropriate name (
mysql or mysqld
) where you see
mysql
in the commands below.
To start the server, run the following command /etc/init.d/mysql start
Set a password for the database root account mysqladmin --user=root password the_new_mysql_root_password
You can stop the server by typing the command /etc/init.d/mysql stop
The package-based installation process generally starts the MySQL server, and configures it to be started automatically each time the system is started. In “Configuring
MySQL for automatic start later in this chapter, we explain how to check and configure automatic startup.

Download 4.24 Mb.

Share with your friends:
1   ...   44   45   46   47   48   49   50   51   ...   366




The database is protected by copyright ©ininet.org 2024
send message

    Main page