Installing XAMPP on a system that already have MySQL

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

Installing XAMPP on a system that already have MySQL

Postby CharithEranga » 23. September 2012 19:49

I'm little bit new to php and xampp.
I have a computer that has installed mysql server and mysql workbench as I was working with java and netbeans.
Now I want to use my computer for developing php and other web stuff too.

I installed xampp successfully.But when I'm trying to access phpmyadmin it gives me a error saying mysql server rejected its connection.
Actually I tried stopping my current mysql service and installing it again.
However xampp have a its own mysql server in its installation path too.

I tried configuring config.inc.php to use my existing installation of mysql which is on a separate path.but I failed.

Can anyone please instruct me to configure this xampp to use my existing mysql sever to do everything and ignore the installed one with itself.
Because I don't want two mysql services to run on my system and clash in future.

I'll be glad if anyone can explain me what is best to be use when you're developing java, php, C and all the stuff on a same machine.


Thank You.

PS: I have been given a password for my existing mysql sever(user = root) as we do it usually when installing mysql alone.
CharithEranga
 
Posts: 4
Joined: 23. September 2012 19:02
Operating System: Windows 7 Ultimate x64

Re: Installing XAMPP on a system that already have MySQL

Postby Altrea » 24. September 2012 09:33

Hi CharithEranga (there is ALWAYS time for a short salutation, especially if you are asking for help on a community board. It's a matter of politeness),

CharithEranga wrote:I'm trying to access phpmyadmin it gives me a error saying mysql server rejected its connection

We can just guess, if you don't tell us the full error message.
In most cases a server rejected message is a #1045 - Access denied for user: ... issue. That means: The server is responding but the user data you are trying to use for connection doesn't fit any of the mysql users. So check how the users are configured.

best wishes,
Altrea
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: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Installing XAMPP on a system that already have MySQL

Postby CharithEranga » 25. September 2012 12:13

Hi Altrea and all,
Thank you for your reply,

The main reason a couldn't gave you the exact error because I tried so many thing before posting here and I don't remember that error.
And I thought this may be a common issue for all.

If you can kindly help me with the last part of the post as i want to do all my developing stuff in this computer..

Can anyone please instruct me to configure this xampp to use my existing mysql sever to do everything and ignore the installed one with itself.
Because I don't want two mysql services to run on my system and clash in future.
I'll be glad if anyone can explain me what is best to be use when you're developing java, php, C and all the stuff on a same machine.


In short I want to use my existing mysql sever with the xampp so that i can store all my databases in one place and use one password..
thank you.
CharithEranga
 
Posts: 4
Joined: 23. September 2012 19:02
Operating System: Windows 7 Ultimate x64

Re: Installing XAMPP on a system that already have MySQL

Postby Altrea » 25. September 2012 13:09

CharithEranga wrote:The main reason a couldn't gave you the exact error because I tried so many thing before posting here and I don't remember that error.
And I thought this may be a common issue for all.

The exact and full error message is the most important part of an error reporting. We don't know your system and your changes. We don't see what you see so we are depended on your information to solve your problem. If the error is not showing any more it is worthless to post it here, because maybe we are trying to solve a problem now which is already gone. This will help nobody and just wastes our time.
Maybe it is a common issue, but without the full error message nobody can estimate.

CharithEranga wrote:Can anyone please instruct me to configure this xampp to use my existing mysql sever to do everything and ignore the installed one with itself.

That is fully a phpmyadmin configuration topic. You need to get the data from your live mysql server (from your hoster) for that and your live mysql server needs to be configured to permit access from outside (which is uncommon for most hoster).
At least it is not recommend to work on the live server from your development engine. Many developers export/import data from their live database to build a test database on their local machine.

CharithEranga wrote:I'll be glad if anyone can explain me what is best to be use when you're developing java, php, C and all the stuff on a same machine.

Using IIS with PHP and Visual Studio on a Windows Machine would be the environment i would recommend to you. If you really want to develop C and Java on that same machine, i wouldn't use XAMPP.
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: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Installing XAMPP on a system that already have MySQL

Postby CharithEranga » 25. September 2012 14:42

Why don't you recommend XAMPP for developing php?
I was trying to use it because most of people use xampp or lampp or something like wamp to do ther developing.
I want to clear my doubts as I'm planing to learn and work in this industry.
I'm currently using netbeans for my java developing and mysq server for database.
It's very good combination untill now for me.
Now I want to do php, html, javascript and stuff like that.
so I was thinking to install Apache server and php.

I'm sorry if this is a long story.But I'm still worrying about this.That's why I'm asking you.

why can't I use Apache and phpmyadmin with my current mysql installation.
Then I don't want to uninstall my current mysql server or switch between services when I'm doing java and php stuff.
I think you can now understand my problem.

If you can tell me little bit about configuring config.inc.php (phpmyadmin config file) or something like that I can manage resolving this.

Thank you again for helping me.
-charith-

PS: The problem comes with the phpmyadmin. As default it is configured to use no password and everything else also per-configured when installing XAMPP.
CharithEranga
 
Posts: 4
Joined: 23. September 2012 19:02
Operating System: Windows 7 Ultimate x64

Re: Installing XAMPP on a system that already have MySQL

Postby Altrea » 25. September 2012 14:59

CharithEranga wrote:Why don't you recommend XAMPP for developing php?

Thats not what i said. XAMPP is great if you want to develop PHP. But you are asking for an environment solution for multiple programming languages and for that i recommend the .NET environment with Visual Studio. Visual Studio, .NET and IIS are that good connected to each other that it makes more sense to use it for PHP development too then build two environments on one machine.

CharithEranga wrote:I was trying to use it because most of people use xampp or lampp or something like wamp to do ther developing.
I want to clear my doubts as I'm planing to learn and work in this industry.
I'm currently using netbeans for my java developing and mysq server for database.
It's very good combination untill now for me.
Now I want to do php, html, javascript and stuff like that.
so I was thinking to install Apache server and php.

For that XAMPP is a good solution.

CharithEranga wrote:why can't I use Apache and phpmyadmin with my current mysql installation.
Then I don't want to uninstall my current mysql server or switch between services when I'm doing java and php stuff.
I think you can now understand my problem.

Sure you can use it. I just said that doing development stuff on a live/productive database server is not recommend. If that is a development mysql server too for your java stuff, thats okay. As i said, it's just a matter of phpmyadmin configuration. phpmyadmin needs to now how to connect to that mysql server.

CharithEranga wrote:If you can tell me little bit about configuring config.inc.php (phpmyadmin config file) or something like that I can manage resolving this.

There is not much to say. You need to know the host (if the mysql is running on the same machine as your Apache that will be localhost), the mysql admin username (root for example) and it's password. If you change the phpmyadmin configuration $cfg['Servers'][$i]['auth_type'] from 'config' to 'cookie' you don't need to type in the password in the configuration, because phpmyadmin will ask you for it.

best wishes,
Altrea
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: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Installing XAMPP on a system that already have MySQL

Postby CharithEranga » 26. September 2012 10:03

Thank you for your help Altrea.. :) :)
I did manage to resolve my problem..
I stopped mysql server and installed Xampp then configure config.inc.php, $cfg['Servers'][$i]['auth_type'] from 'config' to 'cookie'..
now its working..
but there is a little problem,
After successfuly login to phpmyadmin I changed $cfg['Servers'][$i]['auth_type'] from 'cookie' to 'config' again and...
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'mypass';


thinking it will login automaticly and no need to give my pass every time..
and then I restart apache and mysql services..
but It has not changed..phpmyadmin still ask me to give user name and password on login..
Can you tell me why is that?

Thanks.
charith

PS: I can login without any problem giving user name and password on that page.
CharithEranga
 
Posts: 4
Joined: 23. September 2012 19:02
Operating System: Windows 7 Ultimate x64


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 83 guests