All posts tagged mysql
Well now here’s an interesting error that mysteriously "just started happening" for no apparent rhyme or reason. We were working on a Cpanel server that we’re very familiar with, and went through the usual process of creating a new mysql database, creating a new mysql user, and then adding that . . . Read more
Let’s say you’ve got root privileges, and you’re working along, and you want to quickly backup a database for USERNAME on the PM servers… cd /home/USERNAME/_back mysqldump -uroot DATABASENAME > DATABASENAME_YYYYMMDD_shortDescription.sql (Check the size of the backup file, always a good idea) ls -lah DATABASENAME_YYYYMMDD_shortDescription.sql (Change the owner and group . . . Read more
Running as root, this command will repair all mysql databases on the server. Yes, this will take some time! Note, on PM servers, if you’re logged in as root, then you do not need to specify the password. Other servers may vary. mysqlcheck -Aao –auto-repair -u root where: “A” == . . . Read more
Note: If you’re working in a WHM / Cpanel environment, do NOT do it this way, instead, use the Cpanel tools… (oh, and yea, anything enclosed in “<” and “>” below, are not intended literally, but rather as a placeholder for more reasonable inputs) Login to the mysql command line as . . . Read more
A few tasty tidbits, to jog the memory about database & server optimizations… To be expanded. Share your thoughts and suggestions! Example Server: Memory Available: 1,751,724k total Handy Queries: mysql> SHOW VARIABLES LIKE ‘%cache%’; mysql> SHOW STATUS LIKE ‘Qcache%’; My.cnf Tweaks: ; QUERY CACHE… query_cache_size = 500M query_cache_type = 1 . . . Read more