Differences between version 6 and previous revision of MySQLNotes.
Other diffs: Previous Major Revision, Previous Author, or view the Annotated Edit History
Newer page: | version 6 | Last edited on Sunday, April 11, 2004 5:33:30 pm | by AristotlePagaltzis | Revert |
Older page: | version 5 | Last edited on Sunday, April 11, 2004 5:28:04 pm | by AristotlePagaltzis | Revert |
@@ -1,7 +1,5 @@
-!! Resetting a forgotten [MySQL] ''
root''
password
-
-Instructions according to [MySQL Documentation|http://www.mysql.com/documentation/mysql/bychapter/manual_Problems.html#Resetting_permissions]
+!! Resetting a forgotten [MySQL] root password
You first need to make [MySQL] forget the current credentials. This can only be done by the SuperUser or the user mysqld runs as, because the daemon must be stopped, which requires sending it a kill(1) signal (don't use __-9__!!). The [PID] is found in the __.pid__ file normally found in the [MySQL] database directory:
__#__ kill `cat /path/to/mysql/datadirectory/''hostname''.pid`
@@ -19,18 +17,20 @@
You should now be able to connect using the new password. __''Test this!''__
One final step remains: stop __mysqld__ and restart it normally.
+
+See also: [MySQL Manual: A.4.2 How to reset the Root Password | http://dev.mysql.com/doc/mysql/en/Resetting_permissions.html]
!! Clearing Unwanted Binary Log Files
mysql in some configurations can log all database activity to a binary log file (usually in /var/lib/mysql). If you have a busy site this can grow quite large. The recommended management solution in the mysql manual is to remove binary log files that you no longer want. They suggest removing files that are older than 3 days. To remove all binary log files you can use the following command
RESET MASTER ;
-!! What to do if
the table handler is returning error 28
+!! [PHP] says
the table handler is returning error 28
-If the __
mysql_error()__
[PHP] function returns
+If the [
mysql_error() | http://www.php.net/manual/en/function.mysql-error.php]
[PHP] function returns
Got error 28 from table handler
this means your disk runneth over. Probably __/tmp__. Go clear it out.