mysql on Slackware
25, Jul, 2009I am far from any sort of mysql expert. I know just barely enough to make myself dangerous. Take heed on what your about to read, and double check everything!
To setup mysql on Slackware, read /etc/rc.d/rc.mysql. Tells you everything you need to know.
Install the initial database for mysql as root
mysql_install_db --user=mysql
Then start mysql
rc.mysqld start
Create a password where {password} is the password you want to create.
mysqladmin -uroot password {password}
Login to mysql and create the MythTV database. I’ve followed MythTV’s instructions before, and copied their sample database over. The following works just as well.
mysql -uroot -p<password> >create database mythconverg; >GRANT ALL ON mythconverg.* TO mythtv@"192.168.1.%" identified by "mythtv"; >FLUSH PRIVILEGES; >quit;
Line by line -
1. Logs you into to mysql as root.
2. Creates a new database titled mythconverg. This is MythTV’s default database name. You could name it something else, but then you would have to change the default entries in every backend and frontend. Plus it’s hard to tell for sure if this value is or is not hard coded some where in some MythTV plugin.
3. Gives privileges of user mythtv to the database mythconverg which login as mythtv from the IP addresses 192.168.1.0 - 192.168.1.255. Those are usually your local LAN IPs. You can replace the IP with a FQDN if your network is properly setup - mythtv@”%.disturbed1.org”.
4. Activates the privileges.
5. Orders pizza …. wait, quits mysql :-)
Slackware also ships the standard my.cnf files to /etc, but not a default my.cnf. These are my-small/medium/large.cnf. Plenty of documentation on the web about tuning mysql. I tuned the my.cnf several times, several ways. Never personally made a difference, the my-medium.cnf works just fine. One thing you may want to investigate is the binary logging feature. If you are not replicating your mysql server, or need complete binary transaction logs - these grow quite huge in a matter of days - turn it off.
# Replication Master Server (default)
# binary logging is required for replication
#log-bin=mysql-bin
Notice log-bin=mysql-bin is commented out. This completely turns that option off. You can tune the fequency, size, and amount of logs, both through mysql and using a log rotate.
If you do have remote frontends, these PCs will also need access to the mysql database. We already granted privileges above, we need to turn this on here as well.
# Don’t listen on a TCP/IP port at all. This can be a security enhancement,
# if all processes that need to connect to mysqld run on the same host.
# All interaction with mysqld must be made via Unix sockets or named pipes.
# Note that using this option without enabling named pipes on Windows
# (via the “enable-named-pipe” option) will render mysqld useless!
#
#skip-networking
By default skip-networking is un-commented. Comment it out if you want to allow network connections to your mysql databases.
Any change you make to /etc/my.cnf will not be in effect until msysql is restarted.
Add comment
Fill out the form below to add your own comments
Saturday, July 31, 2010 - 12:26:58
Hi,
Firstable,congratulations on Your beautyful Web Site.
We are looking to find link partners for our Iphone website.We sell all kind of Iphone 4 accessories.If you are interested,please send us your link details and will add you link immediately.
Best Regards,
John