MySQL
From Alessandro's Wiki
Problemi
- Un bel giorno ho avuto un problema...
- errori in /var/log/messages:
061013 18:14:58 [ERROR] Can t start server : Bind on unix socket: Permission denied 061013 18:14:58 [ERROR] Do you already have another mysqld server running on socket: //var/run/mysqld/mysqld7415.sock ? 061013 18:14:58 [ERROR] Aborting
- si risolve con
chown -R mysql:mysql /var/lib/mysql chown -R mysql:mysql /var/run/mysql
SQL
mysql -s -N -B -u user -p -D amarokdb -e "SELECT path FROM images" for a in `mysql -s -N -B -u user -p -D db -e "SELECT path FROM images"`; do cp -v "$a" /var/www/localhost/htdocs/media/covers/; done
Grant
GRANT priv_type [(column_list)] [, priv_type [(column_list)]] ... ON [object_type] {tbl_name | * | *.* | db_name.*} TO user [IDENTIFIED BY [PASSWORD] 'password'] [, user [IDENTIFIED BY [PASSWORD] 'password']] ... [REQUIRE NONE | [{SSL| X509}] [CIPHER 'cipher' [AND]] [ISSUER 'issuer' [AND]] [SUBJECT 'subject']] [WITH with_option [with_option] ...]
GRANT SELECT ON test.* TO 'nagios'@'localhost' IDENTIFIED BY 'la password che vuoi';