Unexpected exception MySQLSyntaxErrorException: SQL error when doing: Taking a connection from the data source
SQL exception: Unknown database 'teamcitydb'
I'm getting this error when I open the Web UI for the TeamCity server in firefox, and I'm not sure why it can't take a connection to this database. I followed all the steps in the installation procedure.
Any help or guidance would be appreciated!
It seems you have not create for database in the MySQL correctly.
According to the latest manual, you should run below command after connecting to the MySQL:
create database teamcitydb collate utf8_bin;
create user <user-name> identified by '<password>';
grant all privileges on <database-name>.* to <user-name>;
grant process on *.* to <user-name>;
Related
I am getting an error in Toad Edge 2.1.5 for the MySQL database.
For one of the databases, the same JDBC is working for another database with the same version of MySQL 8. it is giving the above error.
Kindly help me to rectify the error.
I'm using MySQL 8 Server in same machine.
I had the same problem and it worked connecting with root user. Make sure you are connecting with the same user than in the other successful connection.
In case you are trying with the same user, type this on your MySQL server console:
ALTER USER 'youruser'#'localhost' IDENTIFIED WITH mysql_native_password BY 'yourpassword';
It's necessary for authenticating in MySQL 8.
Today I came to the realization that I cannot add or delete any of the databases that belong to any of my clients on my Plesk server.
I had been receiving this error:
Error: Unable to remove some of the selected databases. The user
specified as a definer ('root'#'localhost') does not exist
So I found and ran this fix:
# plesk db
# CREATE USER 'root'#'localhost' IDENTIFIED BY 'password';
Now when trying to add or remove a database I receive a new error:
Error: Connection to the database server failed: View 'mysql.user'
references invalid table(s) or column(s) or function(s) or
definer/invoker of view lack rights to use them
(I'm not sure if it is related or not, but I updated MariaDB a few days ago. I'm pretty sure that I created a new database after doing so though).
CentOS Linux 7.7.1908 (Core) |
Plesk Onyx |
Version 17.8.11 Update #80 |
mysql 10.4.11-1.el7.centos |
10.4.11-MariaDB MariaDB Server
Seems root#lo...got removed when you upgraded MariaDB few days ago.
Choice 1:
It would have removed root#127... also and you would have used both root user references to your databases, connected dbs, views, etc. Views mainly as the error points to that also. So try this too.
CREATE USER 'root'#'127.0.0.1' IDENTIFIED BY 'password';
Choice 2:
After re-creating root, try
flush privileges
If not Ok, you shall restart mysql and try.
systemctl restart mariadb.service
I am trying to execute the following query into MySQL Workbench 8.0.15:
ALTER USER 'root'#'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
I am receiving an error that states:
"ALTER" is not valid at this position for this server version, expecting : CACHE, CHECKSUM, COMMIT, DEALLOCATE, DO, EXECUTE, ...
What could I do to fix this error?
I had the same problem, I fix this error by creating a new connection in Mysql Workbench
I reinstalled the server running MySQL. I had created a backup of the database by using MySQL Workbench. Now I'm trying to import the dump in to the database trough the same program but I get the following error:
ERROR 1142 (42000) at line 656: SELECT,LOCK TABL command denied to user 'root'#'MIKKOS' for table 'events_waits_summary_by_thread_by_event_name'
I tought that root had full privileges. I ran the following but the same error appears with the previous query after executing this:
GRANT ALL PRIVILEGES ON *.* TO 'root'#'%' WITH GRANT OPTION
It also appears when running locally (root#localhost).
What to do?
Check which databases MySQL Workbench included in the dumpfile. I believe it defaults to dumping everything, including DBs like user and performance_schema. Those are the problem, your grant tables are probably fine.
Remove the unneeded databases, especially performance_schema and MySQL will likely import the dumpfile without errors.
You need to repair internal table structure after reinstallation a newer MySQL server. To do so try:
REPAIR TABLE `events_waits_summary_by_thread_by_event_name`;
It would be better to drop database and restore it from full mysql database dump if you have one.
I get the following error when trying to make a jdbc connection to a mysql database:
Attempting to connect to jdbc:mysql://localhost/castel castel castel
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Access denied for user 'castel'#'%' to database 'castel'
I can connect to the database through the command line without a problem using the same credentials. I thought it might be a privilege issue so I ran:
GRANT ALL PRIVILEGES ON mysql.* TO 'castel'#'%'
Any help would be greatly appreciated.
OK the problem was completely unrelated to database configuration. It turns out my box had it's iptables configured to forward all traffic on port 3306 to another machine so I wasn't talking to the database that I thought was.