tomlankhorst / comments

utterances 🔮
0 stars 0 forks source link

mysql-my-cnf-options-file/ #16

Open utterances-bot opened 2 years ago

utterances-bot commented 2 years ago

Configuring MySQL with .my.cnf file | Tom Lankhorst

Connecting to a MySQL server often involves providing hostnames, usernames and passwords. Use a .my.cnf configuration file to provide defaults that simplify working with a MySQL server.  Providing a default password reduces security. Take effort to make sure that the password cannot be read by other users on the system. If the server runs locally, use credentials that are only allowed to connect locally.

https://tomlankhorst.nl/mysql-my-cnf-options-file/

gbouthenot commented 2 years ago

Do not use the "database" parameter in the [client] section, this break mysqldump:

full name 'databases' instead.
Warning: mysqldump: ignoring option '--databases' due to invalid value 'databasename'

Better use : ``` [client] user=username host=localhost password=p455w0rd

[mysql] database=databasename