Xampp-Mysql-Eclipse connection error - mysql

I have installed eclipse and xampp in my mac and tried to connect with mysql server from eclipse using mysql-5.7.9-osx10.10-x86_64 connector.
I have the user "root#localhost" granted with all privileges to all databases.
1) I'm able to connect only mysql database in phpmyadmin server.
Unable to connect any other database. Am getting an error :
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown
database 'test'
2)After connecting with mysql database using
Class.forName("com.mysql.jdbc.Driver");
con=DriverManager.getConnection("jdbc:mysql://localhost:3306/mysql","root","1234");
I created a table adminlogins in mysql database, and used command
"select * from mysql.adminlogins"
but I am getting an error
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table
'mysql.adminlogins' doesn't exist.
I have tried all possible ways creating new user and granting all permissions. I am unable to figure out where am going wrong please some help me with this.

mysql database is reserved for system use. It is not recommended to create your own tables there. That said, the cause of your error is that the table was not created where you think it was if it was created at all.
Regardless, try creating the table in another database. If it does not work, post the exact commands that you used to create it with the messages that were returned.

Related

Cannot log into MySQL workbench server - unknown database

After dropping a schema in MySQL workbench and attempting to re-create it (a process I have done many imes, it is just an easy way to clear out the database so that hibernate can recreate it), I suddenly got this error for the first time and now I cannot do anything with MySQL workbench. Any help?
Cannot Connect to Database Server Your connection attempt failed for
user 'root' to the MySQL server at localhost:3306: Unknown database
'bookstore'
It then makes me check that MySQL is running on localhost, port 3306, user root has rights, password is correct, etc. This is all correct. I know the database is unknown because I dropped it, but I am not sure why that is causing an issue now when all I want is to be able to log in to the server. I tested the connection via settings for the server connection and it is actually able to connect fine. I have done this before many times with no issues.
Any help would be greatly appreciated.

Talend MySQl Database error

I am trying to create a new database connection in talend studio and it is showing me this error:
Connection failure. You must change your database settings.
I have configured MySQl installer and also I have searched about this error and saw some answers but neither of them were clear, how can I fix this problem.
The exception thrown says that Talend was unable to connect to the database "demo". Try to create a database with the name "demo" with another SQL tool before connecting to it with talend.

Setting up openfire server

I am having a problem setting up OpenFire on my localhost.
After setting the localhost database I seem to get this error.
The error appears after i select this option in the setup process:
"Store users and groups in the server database. This is the best option for simple deployments."
The web browser shows the following error:
"Problem accessing /setup/setup-profile-settings.jsp. Reason:
Server Error
Caused by:
java.lang.NullPointerException"
My database has been set up but there are no tables in it.
Could it be that I need to create a table with two rows: Users and Groups?
Where is the file setup-profile-settings.jsp? What type of file is this?
Could it be on my localhost server?
Thanks for any advice
If your database has no tables, then you are missing the Setup the Database step.
You have to import the schema file into your MySQL database from resources/database directory of the installation folder.
Guide for setting up database for MySQL (and other database) can be found here: http://www.igniterealtime.org/builds/openfire/docs/latest/documentation/database.html
Full installation guide http://www.igniterealtime.org/builds/openfire/docs/latest/documentation/install-guide.html

Error in configuring MySql workbench - Failed to connect to MySql at localhost

I am new to MySql workbench and never needed to use a lot of DBs before now.
I had an sql script containing all the DB creation, tables, population etc.
So using MySql workbench, I Reversed Engineering Using a Create Script.
Fine, it worked as I can see my tables.
Now I want perform some select over my data and I first need to create a new connection,
So I tried to Creating a MySQL Connection
but when I test the connection, I get the following error: "Failed to connect to MySql server on 127.0.0.1" (10061).
Question: what to use in the below menu (Connection/RemoteManagement/System Profile) or what else could be my problem?
my problem was that I didnt have a db, so I decided to use wampserver which includes everything and it's very simple to use.

Easy PHP and mysql ..php cannot see database on local pc (all works on server)

I have a website written in php and mysql (written by someone else) and I need to alter it- just for your interest it is bridgetjonesart.co.uk. So I thought I would download it to my desktop pc and use easy php and mysql locally to make changes then upload it again.
I seem to have downloaded everything okay. I first just tried to run existing php using Easy Php and got
Warning: mysql_connect(): Access denied for user 'runningc'#'localhost' (using password: YES) in C:\Program Files (x86)\EasyPHP-12.1\www\backup from runningc\public_html\bridgetjonesart.co.uk\mysqlLogin\mysql_connect.php on line 6
Could not connect to database. Error
I have the sql database as a file 'runningc_bjart.sql' in the root directory but I think the php cant see it so I tried to use easy php administration, phpmyadmin and thought perhaps I should import the 'runningc_bjart.sql' file. So I tried and got an error message ...
Error
SQL query:
--
-- Table structure for table `Blog`
--
DROP TABLE IF EXISTS `Blog` ;
MySQL said: Documentation
#1046 - No database selected
I am not sure what to try next, any help would be really appreciated.
Thank you. Bridget
The error messages are VERY clear.
Error #1: You're using the incorrect credentials, or have forgotten to grant rights on your database to the credentials you're using.
Error #2: You've forgotten to set a default database, so MySQL has no idea which database it should be looking in for the table you're trying to drop.
e.g. you need
mysql_select_db('mydatabase');
or change your DROP query to be
DROP TABLE mydatabase.Blog;
With phpmyadmin, create a new database named runningc_bjart and import the file there. Then search in your project for a config file where the db password is set and change it with your local mysql password