- Show all Docs ( 5 ) Collapse Docs
- Show all Docs ( 309 ) Collapse Docs
- Show all Docs ( 1 ) Collapse Docs
- Show all Docs ( 31 ) Collapse Docs
Using Fedora 20 MySQL Relational Databases
MySQL is a widespread database management system that thousands of web and server applications use as their primary data storage provider.
To bring your system up to date and install MySQL, type in the following commands:
#yum install mysql-server
#chkconfig mysqld on
*Your server will have the MySQL server package and all of its dependencies and client libraries installed automatically. You can begin using MySQL by executing the following command:
#service mysqld start
After installing MySQL, it is highly recommended that you run the programme known as mysql secure installation, which assists in securing MySQL. While you are in the process of running mysql secure installation, you will be given the opportunity to change the MySQL root password, get rid of anonymous user accounts, disable root logins from anywhere other than localhost, and get rid of test databases. It is strongly suggested that you select yes for these available options. If asked to reload the privilege tables, choose the yes option when prompted. To start the programme, you need to run the following command:
By default, MySQL will utilise the localhost connection (IP address 127.0.0.1). If you want to connect your local clients to MySQL remotely, we recommend consulting our secure remote access guide.
Although it is not recommended to make MySQL accessible from a public IP, you can alter the address on which it listens by editing the bind-address parameter in /etc/my.cnf. MySQL binding to a public IP requires special firewall configuration to restrict access to authorised users.
If you have modified MySQL's settings, you must restart the server with the following command:
#service mysqld restart
The most common way to talk to MySQL is through the mysql client programme. To get started, type the following command at your prompt:
#mysql -u root -p
*After login you will face below interface
Make a database and give it a user.
#CREATE DATABASE microhostdb;
#CREATE USER 'microhost'@localhost IDENTIFIED BY 'password';
#GRANT ALL PRIVILEGES ON microhostdb.* TO 'microhost'@localhost;
How to Reset MySQL’s Root Password
#service mysqld stop
#mysql -u root
The next step in the password reset process will take place inside the MySQL client software.
#UPDATE user SET PASSWORD=PASSWORD("password") WHERE User='root';
In order to restart MySQL, type in the following command:
#service mysqld restart
MySQL Tuner connects to a running MySQL instance and recommends configurations based on workload. MySQL should have been running for 24 hours before running the tuner. The longer the instance has run, the better MySQL Tuner's advice.
#yum install mysqltuner
Simply enter: to begin using MySQL Tuner.
Please keep in mind that this tool is intended to provide configuration suggestions and is an excellent starting point. It would be prudent to conduct additional research for tuning configurations based on the application(s) that use MySQL.