Comments - How to change root to native-password plugin with dockerhub image

2 years, 9 months ago James Stewart Miller

Perhaps it is because my maria_container is being created inside a pod which only exposes ports 80 and 445? But I am execing into the container so the port shouldn't be necessary.

 
2 years, 9 months ago James Stewart Miller

This...

MariaDB [(none)]> show create user root; ERROR 1290 (HY000): The MariaDB server is running with the --skip-grant-tables option so it cannot execute this statement MariaDB [(none)]> select user,host,plugin from mysql.user; +-------------+--------------------------+-----------------------+

UserHostplugin

+-------------+--------------------------+-----------------------+

mariadb.syslocalhostmysql_native_password
rootlocalhost
rootceramic\_isles\_dev\_pod
root127.0.0.1
root::1

+-------------+--------------------------+-----------------------+ 5 rows in set (0.062 sec)

So that explains why I am getting access denied, because no plugin is being used

 
2 years, 9 months ago James Stewart Miller

If I do the following: podman run -dit -e MARIADB_ROOT_PASSWORD='davebob' -e MARIADB_ROOT_HOST='localhost' --name ${MARIA_CONT_NAME} --pod ${POD_NAME} ${MARIA_IMAGE} and podman exec -e ROOT_PASSWORD='davebob' -e DB_NAME=${DB_NAME} -e DB_USER=${DB_USER} -e DB_HOST=${DB_HOST} -e DB_PASSWORD=${DB_PASSWORD} -it ${MARIA_CONT_NAME} bash -c "mysql -uroot -p\${ROOT_PASSWORD} -hlocalhost -e \"CREATE DATABASE \${DB_NAME} CHARSET utf8; grant all privileges on \${DB_NAME}.* TO \${DB_USER}@\${DB_HOST} identified by '$\{DB_PASSWORD}';\""

I get told that no connection can be made through the socket. tearing my hair out

 
2 years, 9 months ago James Stewart Miller

Ok, I am certain it is because it is running inside a pod. I made a new container using the same commands, and was able to get into it easily.

So, something about the container being inside a pod is causing the issues that I am having.

I guess it is because it is using a network namespace with only 445 and 80 exposed, but that shouldn't stop me from being able to exec into the container and connect using localhost socket. Gah....

 
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.