All links of one day
in a single page.
<Previous day - Next day>

rss_feedDaily RSS Feed
floral_left The Daily Shaarli floral_right
——————————— May 3, 2017 - Wednesday 03, May 2017 ———————————
mysql - auth -

Exactement ce que je cherchais

You can use the mysql_config_editor utility to store authentication credentials in an encrypted login path file named .mylogin.cnf.

To create a new set of credentials run:

mysql_config_editor set --host=db.host.org --user=dbuser --password

and enter your password when prompted.

This will store your authentication credentials in the default client login path.

You can store multiple authentication credentials by specifying a different --login-path option:

mysql_config_editor set --login-path=db2 --host=db2.host.org --user=dbuser --password

By default, the mysql client reads the [client] and [mysql] groups from other option files, so it reads them from the login path file as well. With a --login-path option, client programs additionally read the named login path from the login path file. The option groups read from other option files remain the same. Consider this command:

mysql --login-path=db2

The mysql client reads [client] and [mysql] from other option files, and [client], [mysql], and [mypath] from the login path file.

To print out all the information stored in the configuration file run:

mysql_config_editor print --all=true

More information about the utility can be found at "mysql_config_editor — MySQL Configuration Utility".

mysql - memo -
# do not use utf8, its not "real utf8"
CREATE DATABASE `foo` DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;

# use this :
# https://mathiasbynens.be/notes/mysql-utf8mb4#utf8-to-utf8mb4
CREATE DATABASE `foo` DEFAULT CHARACTER SET utf8mb4 DEFAULT COLLATE utf8mb4_unicode_ci;


CREATE USER 'foo'@'%' IDENTIFIED BY "password";

GRANT ALL ON `foo`.* TO "foo"@"%";




convert :
# For each database:
ALTER DATABASE database_name CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
# For each table:
ALTER TABLE table_name CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
# For each column:
ALTER TABLE table_name CHANGE column_name column_name VARCHAR(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
# (Don’t blindly copy-paste this! The exact statement depends on the column type, maximum length, and other properties. The above line is just an example for a `VARCHAR` column.)
-