Question about testing
I'd like to run the test suite on MariaDB-5 + MariaDB-10 both.
https://mariadb.com/kb/en/mysql-test-overview gives some information + fails to give enough.
Suggest docs add a full example. Something like this...
1) create a database
net1# mysql_create_database --dbname=mariadb_test --dbuser=mariadb --dbpass=mariadb /usr/bin/mysql --defaults-extra-file=/etc/mysql/debian.cnf -e 'CREATE DATABASE mariadb_test CHARACTER SET utf8 COLLATE utf8_general_ci' /usr/bin/mysql --defaults-extra-file=/etc/mysql/debian.cnf -e 'GRANT ALL PRIVILEGES ON mariadb_test.* to 'mariadb@localhost' IDENTIFIED BY "mariadb"; FLUSH PRIVILEGES;'
2) run a test
The reason I ask about this is every test I run fails.
lsof shows my socket is /var/run/mysqld/mysqld.sock + here are the failures.
mysql --defaults-extra-file=/etc/mysql/debian.cnf -e 'SHOW DATABASES' | grep mariadb_test
shows my database exists.
These tests fail to connect to database...
net1# mysqltest --verbose --protocol=socket --socket=/var/run/mysqld/mysqld.sock --database=name=mariadb_test --user=mariadb --password=mariadb mysqltest: Logging to ''. mysqltest: Results saved in ''. mysqltest: Connecting to server (null):3306 (socket /var/run/mysqld/mysqld.sock) as 'mariadb', connection 'default', attempt 0 ... mysqltest: Could not open connection 'default': 1044 Access denied for user 'mariadb'@'localhost' to database 'name=mariadb_test' not ok net1# mysqltest --verbose --host=localhost --database=name=mariadb_test --user=mariadb --password=mariadb mysqltest: Logging to ''. mysqltest: Results saved in ''. mysqltest: Connecting to server localhost:3306 (socket /var/run/mysqld/mysqld.sock) as 'mariadb', connection 'default', attempt 0 ... mysqltest: Could not open connection 'default': 1044 Access denied for user 'mariadb'@'localhost' to database 'name=mariadb_test' not ok net1# /usr/bin/mysql --defaults-extra-file=/etc/mysql/debian.cnf -e 'SELECT db,user,host FROM mysql.db WHERE db="mariadb_test"' +--------------+---------+-----------+ | db | user | host | +--------------+---------+-----------+ | mariadb_test | mariadb | localhost | +--------------+---------+-----------+
Obviously I'm missing something simple + having a complete example would help.
Please update this question with all steps required to run mysqltest.
Thanks.
Answer Answered by Elena Stepanova in this comment.
You have a typo in your mysqltest command line:
--database=name=mariadb_test
So, mysqltest in fact attempts to connect to a database named name=mariadb_test
rather than mariadb_test
which you meant, and throws the error message accordingly:
Access denied for user 'mariadb'@'localhost' to database 'name=mariadb_test' ]
Regardless of this problem, if you want to find more information about MySQL Test framework, there is a good manual for it.