MariaDB: Difference between revisions
Removed unnecessary html codes, changed old MySQL section from MariaDB to MySQL and added warnings |
m →Binary logging: Typo correction |
||
| (4 intermediate revisions by the same user not shown) | |||
| Line 14: | Line 14: | ||
You will need to set the root password. This is like the root account on Linux, it allows full control over MariaDB. Make sure this password is kept secure at all times. Many of the programs that require the MariaDB database will require root access initially to make the tables they require. | You will need to set the root password. This is like the root account on Linux, it allows full control over MariaDB. Make sure this password is kept secure at all times. Many of the programs that require the MariaDB database will require root access initially to make the tables they require. | ||
=== | === Changing the root password === | ||
'''Authentication is done by the Linux root user as of openSUSE 15.4 - log in as root and type <code>mysql</code> to login as root''' | |||
* Open Konsole | * Open Konsole | ||
| Line 38: | Line 40: | ||
=== InnoDB separate tables === | === InnoDB separate tables === | ||
<div style="background:#FFEEEE;border:1px solid #FF0000;"> | <div style="background:#FFEEEE;border:1px solid #FF0000;padding-left:5px;padding-right:5px;padding-bottom:5px;padding-top:5px;"> | ||
'''MariaDB does not use the InnoDB storage engine by default. If you are using MariaDB with standard settings, these settings will have no effect and so don't need to be changed.''' | '''MariaDB does not use the InnoDB storage engine by default. If you are using MariaDB with standard settings, these settings will have no effect and so don't need to be changed.''' | ||
</div> | </div> | ||
| Line 78: | Line 80: | ||
=== Binary logging === | === Binary logging === | ||
<div style="background:#FFEEEE;border:1px solid #FF0000;"> | <div style="background:#FFEEEE;border:1px solid #FF0000;padding-left:5px;padding-right:5px;padding-bottom:5px;padding-top:5px;"> | ||
'''MariaDB does not use binary logging or replication by default. If you are using MariaDB with standard settings, these settings will have | '''MariaDB does not use binary logging or replication by default. If you are using MariaDB with standard settings, these settings will have already been disabled and so don't need to be changed.''' | ||
</div> | </div> | ||
MySQL by default turns on a feature called binary logging. This makes it so that every transaction within the database, including the data, is stored in a binary log. That way, if you are running more than 1 MySQL server in a master-slave configuration, you can link them together and the slave reads the logs to get the same data. You more than likely won't need this if you are running a | MySQL by default turns on a feature called binary logging. This makes it so that every transaction within the database, including the data, is stored in a binary log. That way, if you are running more than 1 MySQL server in a master-slave configuration, you can link them together and the slave reads the logs to get the same data. You more than likely won't need this if you are running a stand-alone MySQL setup. The problems with this implementation are: | ||
* MySQL has to write the transaction twice, once to the table and once to the log. This slows things down. | * MySQL has to write the transaction twice, once to the table and once to the log. This slows things down. | ||
* MySQL has data stored in 2 places, doubling the disk space for each write. This is also a security issue if working with sensitive data. | * MySQL has data stored in 2 places, doubling the disk space for each write. This is also a security issue if working with sensitive data. | ||
If you are not using a MySQL duplication server, the logging is of no use. It can be turned off by the following: | If you are not using a MySQL duplication server, the logging is of no use. It can be turned off by the following: | ||
* | * Go to the Launch Menu and launch Kwrite. | ||
* You then need to | * You then need to go to 'File' on the menu bar and click 'Open'. | ||
* You now need to open the MariaDB configuration file. This is located at <code>/etc/my.cnf</code>. | * You now need to open the MariaDB configuration file. This is located at <code>/etc/my.cnf</code>. | ||
* Scroll down and find the block: | * Scroll down and find the block: | ||
| Line 107: | Line 109: | ||
* Now save this change and close the file. | * Now save this change and close the file. | ||
* For the change to take effect, you will need to restart the MariaDB server. | * For the change to take effect, you will need to restart the MariaDB server. | ||
* | * Go to the Lanuch menu and open Konsole | ||
* At the prompt type <code>service mysql restart</code>. This can take a few seconds. | * At the prompt type <code>service mysql restart</code>. This can take a few seconds. | ||
* Now type <code>service mysql status</code>. You should see that the sever is now running. If it isn't and it says 'failed', there is a problem with what you have typed. You will need to go back through from the beginning, ensuring you have put the <code>#</code> in front of the lines of code shown. | * Now type <code>service mysql status</code>. You should see that the sever is now running. If it isn't and it says 'failed', there is a problem with what you have typed. You will need to go back through from the beginning, ensuring you have put the <code>#</code> in front of the lines of code shown. | ||