Count tables MYSQL

Count tables within a DB, nice and easy..

   

MYSQL Dump Single Table

Dumping Single MYSQL Table

   

Extract Table from SQL Dump – MYSQL

The script below creates individual table exports from a SQL dump.

[code] #!/bin/sh # http://kedar.nitty-witty.com #SPLIT DUMP FILE INTO INDIVIDUAL TABLE DUMPS # Text color variables txtund=$(tput sgr 0 1)    # Underline txtbld=$(tput bold)       # Bold txtred=$(tput setaf 1)    # Red txtgrn=$(tput setaf 2)    # Green txtylw=$(tput setaf 3)    # Yellow txtblu=$(tput setaf 4)   […]

2002 Cannot log in to the MySQL server – MAC

To fix In /etc/php.ini, replaced the three occurences of /var/mysql/mysql.sock with /tmp/mysql.sock prompt% sudo chmod u+w php.ini   <- had to give myself write permission to that file.. you may need to become root user to actually edit the file.. depends who owns php.ini Now edit it..  i vi find:  pdo_mysql.default_socket=/var/mysql/mysql.sock change to: pdo_mysql.default_socket=/tmp/mysql.sock Find: mysql.default_socket[…]

Reset MYSQL root password – Linux

Log on to your Linux machine as the root user. The steps involved in resetting the MySQL root password are to stop the MySQL server, restart it without the permissions active so you can log into MySQL as root without a password, set a new password, and then restart it normally. Here‚Äôs how you do[…]

Select next available ID

## Select the next available UID ## Do not delete users from unixuid and unix gid as there id’s may get re-used ######################################## [sql] SELECT min( r1.uid ) +1 AS next_available_uid FROM unixuid AS r1 LEFT OUTER JOIN unixuid AS r2 ON r2.uid = r1.uid +1 WHERE r1.uid >200 AND r2.uid IS NULL”; [/sql]

MYSQL – Replication

Login to your mysql server: mysql -uBla -p Some useful commands