Mysql 8 remote access

Delete or comment the bind_address parameter from the my.ini file. (The file name is different depend on the OS. On Linux my.ini is actually my.cnf located in directory /etc/mysql/) Restart the service. Create the root user (yes, a new user because what exists is ‘root@localhost’ which is local access only): CREATE USER ‘root’@’%’ IDENTIFIED BY … Read more

Node.js can’t authenticate to MySQL 8.0

MySQL 8.0 uses a new default authentication plugin – caching_sha2_password – whereas MySQL 5.7 used a different one – mysql_native_password. Currently, the community Node.js drivers for MySQL don’t support compatible client-side authentication mechanisms for the new server plugin. A possible workaround is to alter the type of user account to use the old authentication plugin: … Read more

In MySQL SERVER 8.0 the PASSWORD function not working

If you need a replacement hash to match the password() function, use this: SHA1(UNHEX(SHA1())); E.g. mysql> SELECT PASSWORD(‘mypass’); +——————————————-+ | PASSWORD(‘mypass’) | +——————————————-+ | *6C8989366EAF75BB670AD8EA7A7FC1176A95CEF4 | +——————————————-+ and replacement that gives the same answer in version 8: mysql> SELECT CONCAT(‘*’, UPPER(SHA1(UNHEX(SHA1(‘mypass’))))); +————————————————-+ | CONCAT(‘*’, UPPER(SHA1(UNHEX(SHA1(‘mypass’))))) | +————————————————-+ | *6C8989366EAF75BB670AD8EA7A7FC1176A95CEF4 | +————————————————-+

phpMyAdmin on MySQL 8.0 [duplicate]

Log in to MySQL console with root user: root@9532f0da1a2a:/# mysql -u root -pPASSWORD and change the Authentication Plugin with the password there: mysql> ALTER USER root IDENTIFIED WITH mysql_native_password BY ‘PASSWORD’; Query OK, 0 rows affected (0.08 sec) You can read more info about the Preferred Authentication Plugin on the MySQL 8.0 Reference Manual https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password … Read more

How to fix “mbind: Operation not permitted” in mysql error log

Add the capability CAP_SYS_NICE to your container until MySQL server can handle the error itself “silently”. service: mysql: image: mysql:8.0.15 # … cap_add: – SYS_NICE # CAP_SYS_NICE If you don’t have docker-compose, then you can define CAP_SYS_NICE via docker run –cap-add=sys_nice -d mysql References: Docker Seccomp security profiles: https://docs.docker.com/engine/security/seccomp/ Docker resource constraints: https://docs.docker.com/config/containers/resource_constraints/

How do you use the “WITH” clause in MySQL?

MySQL prior to version 8.0 doesn’t support the WITH clause (CTE in SQL Server parlance; Subquery Factoring in Oracle), so you are left with using: TEMPORARY tables DERIVED tables inline views (effectively what the WITH clause represents – they are interchangeable) The request for the feature dates back to 2006. As mentioned, you provided a … Read more

PHP with MySQL 8.0+ error: The server requested authentication method unknown to the client [duplicate]

@mohammed, this is usually attributed to the authentication plugin that your mysql database is using. By default and for some reason, mysql 8 default plugin is auth_socket. Applications will most times expect to log in to your database using a password. If you have not yet already changed your mysql default authentication plugin, you can … Read more

How to grant all privileges to root user in MySQL 8.0

Starting with MySQL 8 you no longer can (implicitly) create a user using the GRANT command. Use CREATE USER instead, followed by the GRANT statement: mysql> CREATE USER ‘root’@’%’ IDENTIFIED BY ‘PASSWORD’; mysql> GRANT ALL PRIVILEGES ON *.* TO ‘root’@’%’ WITH GRANT OPTION; mysql> FLUSH PRIVILEGES; Caution about the security risks about WITH GRANT OPTION, … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)