When I access mysql database on my localhost XAMPP installation I usually type
mysql -u user -p
But today I accidentally mistyped it like this:
mysql -u user-p
And for my surpries got connected without any password prompt. I tried that with many users registered in mysql and it seems they all get opened like this. Is that a bug or vulnerability for XAMPP or is it the normal behaviour for the integrated shell application inside the control panel? And if it is the second, how can I change it because anyone else using my computer can easily access any database and table on my server?
quote : RajaRassani
When you type mysql alone, I bet you'll be able to access the database still. I think the default installation has User=Any, Host=% Password=-- (you can check this in the Users tab of your PhpMyAdmin since you already have this with XAMPP)
Actually it really appears to be user related issue, XAMPP adds too much useless users it seems... Thank you for helping!
Related
The goal here is to connect to mariadb via sequelpro, or by ssh.
The problem that I found is related with the application itself. If I get access to synology server via ssh, I can access to mysql server. How? Going to the folder and run:
/usr/bin/mysql -uroot -p
However, if I try to connect via sequelpro (see screenshot1), it returns an error(see screenshot2). How can I solve this problem? Any idea?
Worked out for me with the exact same settings on the admin account, might sounds silly but might worth a try...
Cheers,
Maxime
Using the user "admin" does indeed work. In stead of, in my case, the user "frank" with full admin privileges, this one does not work. I am not at all happy to enable the admin account. Would like to find out if there is an other, more secure way of connecting to MariaDB via SSH using database client software. In my case it is Navicat for MySQL, although the problem seems universal to many clients.
I 've re-installed mysql, uninstalled MAMP.
So currently I should only have one version of mysql.
I've done the following:
Installed phpmyadmin
Created a database
I try to import data to it, but the file is too big so I do it via the command line. But there I dont see my newly created database, furthermore I see less databases.
If I do show databases; on the command it shows:
information_schema
test
It doesnt show my newly created Database and it doesn`t show other databases that were pre-installed, these are the databases that I see on phpmyadmin:
information_schema
mysql
performance_schema
test
myBBDD->the one I just created and I was looking for to import data via command-line
It seems I have two versions of mysql, but if I stop mysql via command line, I then can't access phpmyadmin so I guess it's the same one, but for some reason I can't access the same databases.
If you could throw me a bone on this? Im completely lost.
To install mysql and phpmyadmin I've followed this tutorial
[EDIT]
I tried to delete test and it did dissapear from the command-line too, so it is the same version of MySql, so it must be a permission issue... still investigating
Thanks.
Sounds like you have MAMP's version of MySQL and a standalone MySQL. See this answer:
Access MAMP's MySQL from Terminal
Just had the same issue, in my case it turned out to be that I wasn't logging in as the correct user.
In the command line, instead of running just mysql, try running mysql -u root -p (replace "root" with whatever user you used in phpMyAdmin to set the databases up). You should then be able to type in the password. Check show databases; again.
Just noticed that user Grasshopper in a previous answers' comments was suggesting exactly this, hopefully this will help someone anyway by spelling it out.
I have wamp server, it has the option of phpmyadmin and mysql console among with other options. when I open mysql console from this option, and give the command.
show databases;
I get a list of various databases.
Whereas, if open the mysql command prompt form the windows command prompt, I dont see those databases.
Why is this difference??
Please refer the attached screenshot
#Barmar is correct.
When you run the mysql.exe processor the correct syntax is to enter a userid to the mysql.exe It then asks you for the password.
mysql -uroot -p
The is the syntax that the menu item MySQL Console uses behind the scenes.
As there is no password on the root user account after a install of MySQL Server the MySQL Console command will just login using the root userid and you are the super user.
When you do it as you have i.e. just entering the processor name WITHOUT a userid
mysql
You get logged in with a guest account that has little or no privilages, so you only see the databases that that guest account is allowed to see.
basically WAMPServer makes installing these complex tool very easy, however that does not mean they are simple tools. You are going to have to apply yourself to learning how to use them properly now. This seems like a good place to start The manual
I recently switched from using XAMPP to WAMP on my Windows 7 machine so I can do fast switching of PHP versions.
I completely uninstalled XAMPP, but first I backed up my htdocs, apache and mysql directories just in case.
After I installed WAMP and had everything up and running, I figured I could just drop some of my databases from my old XAMPP install into the "data" directory of the mysql directory in WAMP.
So that worked and the database shows up in phpMyadmin, but there are no tables. Is this a permissions thing? Like maybe I don't have the same user in the new install of mysql? Or am I missing something?
Am I allowed to just copy MySQL databases from one data folder to another or does it not work that way?
Both instances are using MySQL 5.5 (at least that's what both README files say in both MySQL directories).
THANKS
When using phpMyAdmin out of the box so to speak in WAMP, MYSQL is installed as per its default installation with the root userid setup to have NO PASSWORD.
Some people seem to think they should make one up when they see the login screen, is that what you are doing?
When you do this phpmyadmin allows you to APPEAR to login but then as you do not have root's privilages you see almost nothing on its other screens and are allowed to do nothing.
Use
username = root
password = (leave this blank)
Then set a password, there is a link on the next page it presents. AND DONT FORGET IT!!!!
This generally isn't a good idea. RiggsFolly was asking about your table type because some table types are more forgiving than others. Other possible trouble spots include file system permission problems or MySQL permission problems (as RiggsFolly asked).
I'd suggest to do an export (as an SQL file) and import that for a complete solution.
I am trying to set up a user for a localhost database on my Mac. I created the database in localhost and imported the SQL. That works fine and I can log into localhost (the local installation of MySQL on my Mac via Sequel Pro) and see it.
I think where things are going awry is in the creation of the user. I had a pre-existing user with a particular username and password. I want to use the same user for localhost so that Zend can connect to the database. So I granted all privileges to the user for the new database schema. This is the exact same thing I did for the first DB on localhost that I originally created the user for.
After granting all privileges via Sequel Pro to the user for the new schema, I restarted the MySQL server on my Mac (twice). But Zend won't connect to the database. It's actually throwing a file not found error, for some strange reason.
I know there's no code here, but I wasn't sure what to post. I was hoping someone would have some idea about what to do. I even tried flushing privileges (FLUSH PRIVILEGES) on the database twice. Do I need something more specific than that command? Anybody have any idea what's going on? Please don't close this as off-topic or something just because there's no code. Just move on if my post doesn't suit you.