cannot connect to to database (netbeans, MAMP, Workbench) - mysql

I am having serious trouble connecting to MySQL server and I do not know why, I am trying to configure a netbeans project I am using MAMP, workbench and netbeans. I have configured MAMP so my Apache server runs on port 80 and MySQL to port to 3306, i have then configured workbench to work on port 3306, i have imported my netbeans project database to workbench, the database is present and connected to MyPHPAdmin, i have put the netbeans project in my 'MAMP/htdocs'folder, netbeans can see my project and is connecting to it but is not connecting to my database and I just cant figure out why, this is on an OSX machine, (I have also read posts about not using TCP/IP connection on workbench and to use local socket/pipe but that does not seem to work for me either, anyway I seem to be establishing a successful connection through TCP/IP...) Configuration setup

Related

can not connect to mariadb server using dbeaver

I have installed and running MariaDB server on a raspberry 4. I am trying to connect with Dbeaver but i am unsuccessful.
Hosting db details:
Raspbian: GNU/Linux 10 (buster)
mariadb: Server version: 10.3.34-MariaDB-0+deb10u1 Raspbian 10
Client access:
Dbeaver: Version 22.1.5.202208211008
phpmyadmin
Now as you see, I have installed phpmyadmin as well and I can successfully connect to host. Also I can ssh remote connect.
However Dbeaver refuses to connect and times out.
What I have tried so far:
I have configured mariadb in 50-server.cnf to bind to 0.0.0.0
I have added an admin user account in mysql with all rights and is stated as admin#192.168.1.x, where the ip is the remote pc's ip with the Dbeaver.
I have tried adding also "admin"#"%"
What should I troubleshoot next?
What worked for me, after some tries, was that I went to Dbeaver connection settings/SSH/ and ticked the use SSH tunnel.In Settings I filled the server details and pi user and password.
Testing and connection was successful after some questions/answers about creating a key and a couple of directories.
I wend back to the connection and I was able to expand the connection view tree with Table/Views/etc
I am not sure why I needed the SSH tunnel to connect. It was not stated to any tutorial I used. Maybe someone in the community can help with this.

LAMPP Database Server

I successfully installed lampp in my Ubunto Server and connect to mysql server in the remote PC. After I added the security settings I wasn't able to connect to database anymore.
Badly needed your ideas. I'm a newbie for this one.
How can I connect to the mysql database remotely?

Problems when updating MySQL 5.0 to 5.5

I have a db hosted at Godaddy.
I've made a backup of my MySQL 5.0 database.
I deleted the db.
I've made a new db which uses MySQL 5.5
with the same password as used before.
Now I can't connect, and am getting this error message:
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
In Godaddy's database details menu the hostname is incorrect. I had to get into phpmyadmin and copy the IP address shown there. Using that when connecting via PHP makes everything okay.

using mysql address of wamp

I had installed wamp that come up with PHP Apache and MySQL. I don't need PHP and Apache I am making a Java EE app with Tomcat. I want to connect from a Servlet to MySQL Database
Class.forName("com.mysql.jdbc.Driver");
con =DriverManager.getConnection
("jdbc:mysql://ADDRESS_MYSQL/DATABASE_NAME","USERNAME","PASSWORD");
The reason is I am unable to get the address of MYSQL, I had opened the sql.ini file and saw that it is running on 3306 but couldn't get the address.
How can I get the address for connecting with the DB?
Check the system tray icon for WAMP, make sure MySQL service is running. During setup you should have been prompted to setup the root password. In that case, if MySQL is running you should be able to connect to localhost:3306 with root to test your MySQL instance. I suspect MySQL service is not running and needs to be started.
All the best.

in MySQL Workbench, how do I create a mysql server on my localhost?

In this question I am using Windows 7 32-bit, and MySQL Workbench 5.2.35 CE Rev 7915
I'm trying to create and connect to a mysql database on my localhost. It seems obvious. I should start up Workbench, go to Server Administration -> New Server Instance, tick the 'localhost' radio button and follow the wizard. But I get to the 'Test DB Connection' step and it fails to 'Open Database Connection'. The Message Log says:
Connecting to MySQL server localhost...
Can't connect to MySQL server on '127.0.0.1' (10061)
Now, my question is this: Am I supposed to have already installed and started up a MySQL server on my localhost with some tool or program other than Workbench? It seems like this wizard is just supposed to create a connection to an already existing mysql server, but I don't know how to create a server on my localhost. I hoped Workbench would provide a way to do all of this: Create MySQL server, start it up, connect to it, query it, etc. but it seems like maybe it can only connect to already existing servers.
What should I do to create a MySQL server on my local machine and connect to it with MySQL Workbench?
You can't. MySQL Server and MySQL Workbench are separate products, as Workbench is a GUI to the Server. To install both, download "MySQL Installer for Windows" and (by default) it will install both (and other) MySQL products.