evil.cz
Linux do každé rodiny, linux do každé kanceláře!

mysql

HOW-TO: MySQL - UTF8 strings saved as Latin1 solution

MySQL, UTF8 database, UTF8 table, UTF8 field ... but odd characters inside. How to convert "á" to "á" etc...

0
Váš hlas: Žádná

Access denied for user 'root'@'' (using password: YES) after power failure

After power failure mysql refuses root login: Access denied for user 'root'@'' (using password: YES)

Try to log in WITHOUT a password: mysql -u root

If successfull, check users table content:
> use mysql;
> select * from user;
All passwords are probably empty - means login without password is poossible now ;-(

GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY 'new_password' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON *.* TO 'root'@'machine_name' IDENTIFIED BY 'new_password' WITH GRANT OPTION;
FLUSH PRIVILEGES;

0
Váš hlas: Žádná

PHP + MySQL + PDO (Ubuntu 8.10 Server)

sudo apt-get install php5-mysql
sudo apt-get install php5-dev
sudo apt-get install libmysqlclient-dev
sudo apt-get install php-pear
sudo apt-get install make
sudo pecl install pdo
sudo pecl install pdo_mysql

edit /etc/php5/apache2/php.ini, add the line for the pdo extension and the specific drivers to the php.ini file, and save the file:

extension=pdo.so
extension=pdo_mysql.so

(edit also /etc/php5/cli/php.ini the same way!!!)

sudo /etc/init.d/apache2 restart

see: http://ubuntuforums.org/archive/index.php/t-364883.html for details

0
Váš hlas: Žádná

Cannot re/start/stop MySQL server after transfer `mysql` database directly (disc-to-disc copy)

Cannot re/start/stop MySQL server after transfer `mysql` database directly (disc-to-disc copy)
Symptoms: error: 'Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)'

0
Váš hlas: Žádná
Syndikovat obsah