Access MySQL from outside

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Re: Access MySQL from outside

Postby Altrea » 04. January 2011 17:32

Than it's not a permission issue.

Try to plain output your sql statement and paste it in phpmyadmins sql window.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8290
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: Access MySQL from outside

Postby mythrix » 04. January 2011 22:07

now i changed the 'root' user where was the setting 'Any host' and seems i can't connect to phpmyadmin anymore

Image

any suggestions?
this is my config.inc.php file

Code: Select all
<?php
$cfg['blowfish_secret'] = 'xampp'; /* YOU SHOULD CHANGE THIS FOR A MORE SECURE COOKIE AUTH! */
$i = 0;
$i++;
$cfg['Servers'][$i]['auth_type']            = 'config';
$cfg['Servers'][$i]['user']                 = 'root';
$cfg['Servers'][$i]['password']             = '';
$cfg['Servers'][$i]['AllowNoPassword']      = true;

$cfg['Servers'][$i]['host']             = 'localhost';
$cfg['Servers'][$i]['connect_type']     = 'tcp';
$cfg['Servers'][$i]['compress']         = false;

$cfg['Servers'][$i]['extension'] = 'mysqli';

$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = '';

$cfg['Servers'][$i]['pmadb']            = 'phpmyadmin';
$cfg['Servers'][$i]['bookmarktable']    = 'pma_bookmark';
$cfg['Servers'][$i]['relation']         = 'pma_relation';
$cfg['Servers'][$i]['table_info']       = 'pma_table_info';
$cfg['Servers'][$i]['table_coords']     = 'pma_table_coords';
$cfg['Servers'][$i]['pdf_pages']        = 'pma_pdf_pages';
$cfg['Servers'][$i]['column_info']      = 'pma_column_info';
$cfg['Servers'][$i]['history']          = 'pma_history';
$cfg['Servers'][$i]['designer_coords']  = 'pma_designer_coords';

$cfg['UploadDir']   = '';
$cfg['SaveDir']     = '';

$cfg['AllowAnywhereRecoding']       = true;
$cfg['DefaultCharset']              = 'utf-8';
$cfg['DefaultLang']                 = 'en-utf-8';
$cfg['DefaultConnectionCollation']  = 'utf8_general_ci';

$cfg['MySQLManualBase'] = 'http://dev.mysql.com/doc/refman/5.1/en';
$cfg['MySQLManualType'] = 'searchable';

?>
mythrix
 
Posts: 14
Joined: 03. January 2011 17:34

Re: Access MySQL from outside

Postby Altrea » 04. January 2011 22:21

What have you changed?
Password or permissions of the user root?
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8290
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: Access MySQL from outside

Postby mythrix » 05. January 2011 01:32

i had this first
Image
and changed the username "root" from the second row to something else... and at last option i picked the second choice to delete the first one and replace with the new one created.. and voila!

from what izzy posted i thought this was the right configuration:

Code: Select all
User                     -               Host                  -              Global Privileges
--------------------------------------------------------------------------------------------------
pma                      -            internal IP              -                      ALL

someUsername             -          %  (Any Host)              -                      ALL 

root                     -             internal IP            -                     ALL


correct me if i'm wrong cause i'm kinda newby at these stuff
mythrix
 
Posts: 14
Joined: 03. January 2011 17:34

Re: Access MySQL from outside

Postby Altrea » 05. January 2011 10:16

well, root needs connection permissions from localhost.
This permission you have deleted.

I don't know why you have deleted this user, but that wasn't a good idea.
You should restore the user. If you don't want a % wildcard for that user, create the permission from Host localhost, like the pma user has.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8290
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: Access MySQL from outside

Postby mythrix » 05. January 2011 13:29

so I should modify config.inc.php file? can u write me an example? like i said i'm new to xampp and without telling me how to do, it doesn't help me at all.. thx
mythrix
 
Posts: 14
Joined: 03. January 2011 17:34

Re: Access MySQL from outside

Postby Altrea » 05. January 2011 13:36

no, you should login in phpmyadmin with an user which has the permission to create new users (e.g. login with the user someUsername).
after that go to the permissions tab and create a new user with the following data:

user: root
host: localhost
password: {leave it blank}

and in the global permissions table mark all options.

You don't need to make any changes to the config.inc.php (exept you don't leave the password fields blank, then phpmyadmin needs to know the password or must be configured to ask for logindata).
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8290
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: Access MySQL from outside

Postby mythrix » 05. January 2011 23:03

Altrea wrote:no, you should login in phpmyadmin with an user which has the permission to create new users (e.g. login with the user someUsername).

man that error appears when i try to open phpmyadmin link... there isn't any login panel so only by modifying some files i would be able to enter again without any freakin errors..
PS: congratz on your elite posts number ^^
mythrix
 
Posts: 14
Joined: 03. January 2011 17:34

Re: Access MySQL from outside

Postby Altrea » 05. January 2011 23:09

oops, my fault.

- Open your phpmyadmin config.inc.php
- search for
Code: Select all
$cfg['Servers'][$i]['auth_type']            = 'config';

-replace with
Code: Select all
$cfg['Servers'][$i]['auth_type']            = 'cookie';

After that you should see a login window if you try to access phpmyadmin.
And NOW you should do what is standing in my post before ^^


The other possibility is to just change the username and password in the config.inc.php file and leave the auth_type to config. Be user the user you define there must have full access to the database.

PS: congratz on your elite posts number ^^

Thank you very much :D
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8290
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: Access MySQL from outside

Postby mythrix » 06. January 2011 01:05

ok i did that and now i get another error #2003 - Can't connect to MySQL server on 'localhost' (10061) :-?
mythrix
 
Posts: 14
Joined: 03. January 2011 17:34

Re: Access MySQL from outside

Postby Altrea » 06. January 2011 01:09

You did WHAT?

You can try to restart the XAMPP components and/or your computer.
Clean your Browser caches too.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8290
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: Access MySQL from outside

Postby mythrix » 06. January 2011 01:35

ok that worked :D
i was able to login only with pma user...
my privileges section looks like this:
Image

edit: still can't modify the database -_-
how can i access that terminal for mysql? where is located and what's the file name? i've tried mysql.exe located in bin folder but it gives me this error:
Image
mythrix
 
Posts: 14
Joined: 03. January 2011 17:34

Re: Access MySQL from outside

Postby Altrea » 06. January 2011 01:48

mythrix wrote:ok that worked :D

Thats good :D

mythrix wrote:my privileges section looks like this:

No. That are just your database specific rights for your "chat" database.
To see all permissions you don't have to select any database.
Click in the little Home/House Symbol to get to the phpmyadmin overwiew page and then use the permissions tab to see all permissions.

mythrix wrote:i was able to login only with pma user...

pma is a user only phpmyadmin should use. In XAMPP It's just for basic database changes in the phpmyadmin table.
I don't know why the user pma has so many rights in your installation. In the Default installation it doesn't have any global rights, just database specific rights (SELECT, INSERT, UPDATE, DELETE) to the phpmyadmin table.

For maintenance you should have your own local administration user from localhost.
I recommend you to create a new root user like described a few posts earlier.

[Edit]
mythrix wrote:edit: still can't modify the database -_-
how can i access that terminal for mysql?


DOH... one step after another please...
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8290
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: Access MySQL from outside

Postby mythrix » 06. January 2011 14:08

ok.. so what's the next step?
mythrix
 
Posts: 14
Joined: 03. January 2011 17:34

Re: Access MySQL from outside

Postby Nobbie » 06. January 2011 15:19

mythrix wrote:ok.. so what's the next step?


The next step is reading documentation. Either get you a book, or some tutorials, or simply the original doc from www.mysql.com

And be patiently - nobody had learned all that stuff in a few minutes, neither via a forum. A forum is good place for certain technical problems, but it cannot replace the need of reading documentation.
Nobbie
 
Posts: 8769
Joined: 09. March 2008 13:04

PreviousNext

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 82 guests