I have Apache and SQL running using Xampp and have created a database called "company" in phpMyAdmin. I want to connect to that database using my terminal. I try this, but it fails:
What is with this error? Am I not using the correct syntax?
Don't specify database you want connect to. Try:
mysql -u USERNAME -p
use DBNAME;
https://www.a2hosting.com/kb/developer-corner/mysql/connect-to-mysql-from-the-command-line
Related
How to access Magento bitnami on GCP database and run SQL statements. I do not know where and how to connect to the Magento bitnami on GCP database and run SQL statements
Bitnami Engineer here.
You have different options to run those SQL commands:
Access the instance using a SSH connection and connect to MySQL using the command line. You will need to configure the SSH key in the Google Console in case you don't have a valid one. Then, you can access MySQL by running this command
mysql -u root -p bitnami_magento
Create a SSH tunnel to access phpMyAdmin: We configure phpMyAdmin to only be accessible using a local connection. The SSH tunnel will allow you access /phpmyadmin and you could run the SQL commands there.
https://docs.bitnami.com/google/apps/magento/administration/access-phpmyadmin/
If you need more information about how SSH works and how to access the instance, please check our documentation
https://docs.bitnami.com/google/faq/get-started/connect-ssh/
I am Not able to connect to Azure MySQL database using MySQL workbench.
using ClearDB
you have to go to azure graphice interface and to access to your mysql database server then to take the copy the server name and put it in the host
and the connection name it will be your user name and you have to use the same password which you create in mysql server
and in addition to this try follow this link it will help you to understand more with all of the detailes
https://learn.microsoft.com/en-us/azure/mysql/flexible-server/connect-workbench
How can I create a server name for database engine in logging in to SQL Server Management Studio?
Or how can I find my default server name? I have been using running SQLCMD -L this code in my command prompt but it turns me nothing it just says Servers:
You can try using Localhost or . to connect to your local instance.
Also, to reattach your database (from the mdf file), you can use the Attach Database command that is showed in the following image.
Hope this helps
I installed oracle sqlplus and instant client on mac os using this tutorial: https://tomeuwork.wordpress.com/2014/05/12/how-to-install-oracle-sqlplus-and-oracle-client-in-mac-os/comment-page-1/
I can now open sqlplus in the terminal by typing sqlplus but it asks me for username and password.
I researched on the net that these should be created during installation however when I done it, it didn't prompt me and in the tutorial it doesn't mention it. It only says you should now be able to connect using $ sqlplus username/password#database but I don't have a username, password, nor a database ready.
How do I do this?
I want to set everything up so I can create a database and create tables etc using sqlplus.
SQLplus is a command line client for the Oracle database system and the Instant Client is a slim driver from accessing it. So you haven't installed the Oracle database (server) yet, just the client.
The Oracle server does not run on Mac OS X. You will need to install it on a machine with a different operation system.
Update
Using SQLplus you can connect to the Oracle server at your university (unless they have specifically guarded against it). You will need some information to connect:
Host name
Port number
SID or service name
username
password
Then you can connect using the following command:
sqlplus username#host:port/service
Or:
sqlplus username#'(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=hostname)(PORT=port))(CONNECT_DATA=(SID=sid)(SERVER=dedicated)))'
SQL Developer from Oracle is a free alternative client with a UI that will make it easier to connect to the database and do your assignment. It requires the same information though.
I am unable to connect to localhost after the installation of the sql server 2005. however i am able to connect using my system name.
Is there a way i will be able to connect using localhost by making few changes??
Thanks in advance.
use "." (DOT) instead of localhost and you should be able to connect.