Difference between revisions of "Category:MySQL"
(→Questions and Answers) |
(Removed nowiki tags and added wikipedia) |
||
Line 1: | Line 1: | ||
+ | {{Wikipedia}} | ||
This is the Database system used with MythTV. MySQL is a very versatile database system, used with many projects and web sites. For more info on MySQL itself, see [http://www.mysql.com]. For info on the MySQL database used with Myth, read on. | This is the Database system used with MythTV. MySQL is a very versatile database system, used with many projects and web sites. For more info on MySQL itself, see [http://www.mysql.com]. For info on the MySQL database used with Myth, read on. | ||
Line 9: | Line 10: | ||
Q: My database seems b0rked<br> | Q: My database seems b0rked<br> | ||
A: Try these magic incantations, it will try to fix broken databases: | A: Try these magic incantations, it will try to fix broken databases: | ||
− | + | mysqlcheck -r -u mythtv -pmythtv mythconverg | |
− | mysqlcheck -r -u mythtv -pmythtv mythconverg | ||
− | |||
If you only want to check which part of the data base that is broken, run mysqlcheck without the -r. | If you only want to check which part of the data base that is broken, run mysqlcheck without the -r. | ||
Q: When running mysqlcheck I get the error message "Access denied for user ..." <br> | Q: When running mysqlcheck I get the error message "Access denied for user ..." <br> | ||
A: The problem may be that you are using the wrong password. The following commands will change the mysql password to "mythtv": | A: The problem may be that you are using the wrong password. The following commands will change the mysql password to "mythtv": | ||
− | <pre | + | <pre> |
# mysql -u root -p mysql | # mysql -u root -p mysql | ||
myqsl> GRANT ALL PRIVILEGES ON *.* TO 'mythtv'@'localhost' | myqsl> GRANT ALL PRIVILEGES ON *.* TO 'mythtv'@'localhost' | ||
Line 23: | Line 22: | ||
mysql> FLUSH PRIVILEGES; | mysql> FLUSH PRIVILEGES; | ||
mysql> quit | mysql> quit | ||
− | + | </pre> | |
Note that you will have to change the database password in the mythtv setup to "mythtv" once you get it running again. | Note that you will have to change the database password in the mythtv setup to "mythtv" once you get it running again. | ||
Q: I'm getting a SQL error from mythbackend when upgrading. What does that mean?<br> | Q: I'm getting a SQL error from mythbackend when upgrading. What does that mean?<br> | ||
A: Try using perror to get more information | A: Try using perror to get more information | ||
− | <pre | + | <pre> |
2004-05-25 22:56:24 Upgrading to schema version 1046 | 2004-05-25 22:56:24 Upgrading to schema version 1046 | ||
2004-05-25 22:56:24 Upgrading to schema version 1047 | 2004-05-25 22:56:24 Upgrading to schema version 1047 | ||
Line 42: | Line 41: | ||
$ perror 28 | $ perror 28 | ||
Error code 28: No space left on device | Error code 28: No space left on device | ||
− | + | </pre> | |
also check etc/mythtv/mysql.txt it should look like this: | also check etc/mythtv/mysql.txt it should look like this: | ||
− | <pre | + | <pre> |
DBHostName=localhost | DBHostName=localhost | ||
DBUserName=mythtv | DBUserName=mythtv | ||
DBName=mythconverg | DBName=mythconverg | ||
DBPassword=mythtv | DBPassword=mythtv | ||
− | + | </pre> | |
[[Category:Glossary]] | [[Category:Glossary]] |
Revision as of 09:13, 21 November 2008
This is the Database system used with MythTV. MySQL is a very versatile database system, used with many projects and web sites. For more info on MySQL itself, see [1]. For info on the MySQL database used with Myth, read on.
Database Schema
If you run into trouble with some of your MythTV tables or are looking for information on how the system is stored, browse the Database Schema for more information.
Questions and Answers
Q: My database seems b0rked
A: Try these magic incantations, it will try to fix broken databases:
mysqlcheck -r -u mythtv -pmythtv mythconverg
If you only want to check which part of the data base that is broken, run mysqlcheck without the -r.
Q: When running mysqlcheck I get the error message "Access denied for user ..."
A: The problem may be that you are using the wrong password. The following commands will change the mysql password to "mythtv":
# mysql -u root -p mysql myqsl> GRANT ALL PRIVILEGES ON *.* TO 'mythtv'@'localhost' -> IDENTIFIED BY 'mythtv' WITH GRANT OPTION; mysql> UPDATE user SET Password=PASSWORD('mythtv') WHERE user='mythtv'; mysql> FLUSH PRIVILEGES; mysql> quit
Note that you will have to change the database password in the mythtv setup to "mythtv" once you get it running again.
Q: I'm getting a SQL error from mythbackend when upgrading. What does that mean?
A: Try using perror to get more information
2004-05-25 22:56:24 Upgrading to schema version 1046 2004-05-25 22:56:24 Upgrading to schema version 1047 DB Error (Performing database upgrade): Query was: ALTER TABLE record ADD COLUMN search INT UNSIGNED NOT NULL DEFAULT 0; Driver error was [2/-1]: QMYSQL3: Unable to execute query Database error was: Error writing file './mythconverg/#sql-785_2.frm' (Errcode: 28) For future reference you can use perror with the mysql error number: $ perror 28 Error code 28: No space left on device
also check etc/mythtv/mysql.txt it should look like this:
DBHostName=localhost DBUserName=mythtv DBName=mythconverg DBPassword=mythtv
Pages in category "MySQL"
The following 9 pages are in this category, out of 9 total.