Enjoy Slackware 15.0!
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
howtos:databases:install_mysql_on_slackware [2012/09/26 02:35 (UTC)] mfillpot moved from the general howtos namespace |
howtos:databases:install_mysql_on_slackware [2013/02/12 11:31 (UTC)] alienbob Layout changes (proper heading/enumeration) and use of correct english in the new UTF8 section. |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | < | + | < |
+ | <!-- Reviewed 2012-02-12 alienbob | ||
====== Install MySQL On Slackware ====== | ====== Install MySQL On Slackware ====== | ||
- | == INSTALL | + | ===== Installing |
+ | Install MySQL from the official Slackware discs or using [[slackware: | ||
- | Install | + | ===== Configuring |
+ | - Create the needed database(s) and set their permissions properly \\ As root, run: < | ||
+ | root@darkstar# | ||
+ | </ | ||
+ | - Enable execution of the //rc script// to start MySQL automatically on boot \\ //This is optional.// < | ||
+ | root@darkstar# | ||
+ | </ | ||
+ | - Enable networking if needed \\ Networking is disabled by default to improve security. If you want to allow network connections, | ||
+ | # | ||
+ | </ | ||
+ | - Start mysqld < | ||
+ | root@darkstar# | ||
+ | </ | ||
- | == CONFIGURE | + | ===== Securing |
- | 1) Create the needed database(s) and set their permissions properly. As root, run: | + | < |
- | | + | ==== Automatic configuration of secure access ==== |
+ | - Run the following command, and answer the questions < | ||
+ | root@darkstar# | ||
+ | </ | ||
- | User specified by '' | + | ==== Manual configuration of secure access ==== |
- | 2) Enable execution of rc script to start MySQL automatically on boot: | + | - Set a password for MySQL's root account < |
+ | root@darkstar# | ||
+ | </ | ||
+ | root@darkstar# | ||
+ | </ | ||
+ | <note tip> | ||
+ | Check the '' | ||
+ | </ | ||
- | chmod 755 / | + | ===== Connecting to your MySQL server ===== |
- | 3) Enable | + | - Connect to your MySQL server using the following command < |
+ | user@darkstar$ mysql -u root -p | ||
+ | </ | ||
+ | - For security reasons you should delete the anonymous user | ||
+ | * For the localhost server: < | ||
+ | mysql> use mysql | ||
+ | mysql> SELECT user, host FROM user; | ||
+ | mysql> DELETE FROM user WHERE host=' | ||
+ | </ | ||
+ | * If you enabled | ||
+ | mysql> use mysql | ||
+ | mysql> SELECT user, host FROM user; | ||
+ | mysql> DELETE FROM user WHERE user=''; | ||
+ | </ | ||
- | Networking is disabled by default to improve security. If you want to allow network connections, | + | ==== Adding Unicode support == |
- | #SKIP=" | + | |
- | + | ||
- | 4) Start mysqld: | + | |
- | /etc/rc.d/rc.mysqld | + | - Change directory to the '' |
+ | - Edit ''/ | ||
+ | [mysqld] | ||
+ | collation-server = utf8_unicode_ci | ||
+ | init-connect=' | ||
+ | character-set-server = utf8 | ||
+ | </ | ||
- | //NOW YOU HAVE A CHOICE - MANUAL INSTALL OR AUTOMATIC// | + | More on Unicode |
- | AUTOMATIC: | + | ===== Troubleshooting ===== |
- | 5) 6) 7) Run the following, answer | + | * Server start errors can be seen in the error log that is located by default at ''/ |
+ | root@darkstar# | ||
+ | </ | ||
- | / | + | * Resetting the root password can be done by creating a new cnf file and add the following lines (please change the password in this example): |
- | Initial root password is "" | + | UPDATE mysql.user SET Password=PASSWORD(' |
- | + | FLUSH PRIVILEGES; | |
- | MANUAL: | + | </ |
- | + | root@darkstar# | |
- | 5) Set a password for MySQL' | + | </ |
- | + | ||
- | | + | |
- | + | ||
- | + | ||
- | 6) You can connect to your MySQL server with: | + | |
- | mysql -u root -p | + | |
- | + | ||
- | + | ||
- | 7) For security reasons you should delete an empty user for localhost server | + | |
- | + | ||
- | | + | |
- | | + | |
- | | + | |
- | + | ||
- | == TROUBLESHOOTING == | + | |
- | 1) Server start errors can be seen in the error log that is located by default at ''/ | + | |
- | + | ||
- | / | + | |
- | + | ||
- | 2 Resetting the root password can be done by creating a new cnf file and add the following lines (please change the password in this example): | + | |
- | + | ||
- | | + | |
- | FLUSH PRIVILEGES; | + | |
- | + | ||
- | Save this file (any name would do) and start the server with the --init-file argument: | + | |
- | + | ||
- | | + | |
- | + | ||
====== Sources ====== | ====== Sources ====== | ||
Line 78: | Line 92: | ||
<!-- Please do not modify anything below, except adding new tags.--> | <!-- Please do not modify anything below, except adding new tags.--> | ||
- | <!-- You must remove the tag-word " | + | {{tag> |
- | {{tag> | + |