DataBase Server is MySql instead Localhost
Posted by: jamarchi (---.ct.co.cr)
Date: June 14, 2020 10:34AM

Hi

I have been workin fine with wamp for many month, yesterday I could see the I couldn´t connecto to any

database, I opene phpmysql and I saw that the server is Server: MySQL:3308 instead of server: Localhost:3308

How can I change the server from Mysql to LocalHost in phpmysql ?

Thank you for your help:

Options: ReplyQuote
Re: DataBase Server is MySql instead Localhost
Posted by: Otomatic (Moderator)
Date: June 14, 2020 11:49AM

Hi,

Right-Click -> Help -> MySQL - MariaDB

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: DataBase Server is MySql instead Localhost
Posted by: jamarchi (---.ct.co.cr)
Date: June 14, 2020 08:00PM

Thank you for your email, but what I need is to have localhost as a Database server not Mysql or MariaDB, how

can I change that? thank you

Options: ReplyQuote
Re: DataBase Server is MySql instead Localhost
Posted by: Otomatic (Moderator)
Date: June 14, 2020 08:20PM

Hi,

Since the origin of Wampserver, i.e. since 2004, the database manager has always been MySQL, and since Wampserver 3.0.8, there is a choice between MySQL and MariaDB. There has never been a localhost as database manager.

Also, I think you are making a slight confusion and that it is PhpMyAdmin and not phpmysql.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: DataBase Server is MySql instead Localhost
Posted by: jamarchi (---.ct.co.cr)
Date: June 14, 2020 08:47PM

Hi,..

So, wy in this image [static.filehorse.com] I can see the server as localhost ? please see the image, in this way I had it

hank you

Options: ReplyQuote
Re: DataBase Server is MySql instead Localhost
Posted by: Otomatic (Moderator)
Date: June 14, 2020 09:08PM

Hi,

It doesn't matter if it's marked localhost or whatever, it's a name assigned to the server in the same way that there could be tartempion or smith as a name.

If you want to keep only MySQL, you read what I told you, you switch MySQl as the default server and then you don't allow MariaDB anymore. You will have only one server.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: DataBase Server is MySql instead Localhost
Posted by: jamarchi (---.ct.co.cr)
Date: June 14, 2020 09:59PM

Hi, thank you for your email

I understood what you said but, why I can´ta see my databases in the phpmyadmin?, I copied this folder

C:\wamp\bin\mysql\mysql8.0.18\data and paste it in the new instalation but I can´t see any database...so for

this reason I said the the problem is the server

Thank you

Options: ReplyQuote
Re: DataBase Server is MySql instead Localhost
Posted by: Otomatic (Moderator)
Date: June 15, 2020 09:08AM

Hi,

> and paste it in the new instalation
You didn't mention a new installation at all in your first message, you just wrote that suddenly, yesterday, you couldn't connect anymore.
In order for a problem to be solved, it is imperative to tell the truth and describe precisely what happened.

The only sustainable way to transfer databases between different versions of MySQL is to export/import them into SQL files. Copying data files is doomed to fail.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: DataBase Server is MySql instead Localhost
Posted by: jamarchi (---.ct.co.cr)
Date: June 15, 2020 05:50PM

Yes your right....

the problem was that I couldn´t connect as I said in the at the begin of this post


Now I can connect using something like this $link = 'mysql:host=localhost:3308;dbname=yt_colores';

now the problem is that I can´t access the databases that I have already created, so I can´t work cuase I can use

the databases, I So I can´t export the databases.... I only see files with MYD, MYIadn SD extension files, Is there

something that I can do in order to export those DB? Thank you for you help

Options: ReplyQuote
Re: DataBase Server is MySql instead Localhost
Posted by: Otomatic (Moderator)
Date: June 15, 2020 06:16PM

Hi,

> ow I can connect using something like this $link = 'mysql:host=localhost:3308;
This means that your databases were created under MySQL.
Read again the document wamp64/mariadb_mysql.txt calmly and you will have to understand it since you have to specify port 3308.

So, in order not to be bothered anymore by the addition of port 3308 and as it is also specified in the above mentioned document, you switch MySQL to the default database manager :
Right-Click -> Tools -> Invert default DBMS MariaDB <-> MySQL

And then, during the connection request to PhpMyAdmin, you have the choice of the DBMS to use (MariaDB or MySQL) as it is, again, explained in the above mentioned document.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: DataBase Server is MySql instead Localhost
Posted by: jamarchi (---.ct.co.cr)
Date: June 15, 2020 06:44PM

Thank you for your help


Any Idea about how to recover my DB ? I only see files with MYD, MYIadn SD extension files, Is there

something that I can do in order to export those DB? Thank you for you help

Options: ReplyQuote
Re: DataBase Server is MySql instead Localhost
Posted by: Otomatic (Moderator)
Date: June 15, 2020 06:45PM

Hi,

> I can´t access the databases that I have already created,
These databases, you had created them when? with which version of Wampserver and which version of MySQL?

To be able to transfer these databases in a new version of Wampserver and MySQL, it is imperative to export these databases in SQL file from the version of Wampserver and MySQL that was used to create them. There is no other way.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: DataBase Server is MySql instead Localhost
Posted by: jamarchi (---.ct.co.cr)
Date: June 15, 2020 07:43PM

I´m not sure.... but I thinkg was recently... like a 3 month ago....

If I try to opene de SDI from one of the files I can see this information. If I see that information I sow that the musql version is 80018 but I´m not sure... if It is true and it is the same that I have installed it... why can´t be load it '

{"mysqld_version_id":80018,"dd_version":80017,"sdi_version":80016,"dd_object_type":"Table","dd_object":{"name":"articulos","mysql_version_id":80018,"created":20200604163912,"last_altered":20200604163912,"hidden":1,"options":"avg_row_length=0;key_block_size=0;keys_disabled=0;pack_record=1;stats_auto_recalc=0;stats_sample_pages=0;","columns":[{"name":"id","type":4,"is_nullable":false,"is_zerofill":false,"is_unsigned":false,"is_auto_increment":true,"is_virtual":false,"hidden":1,"ordinal_position":1,"char_length":11,"numeric_precision":10,"numeric_scale":0,"numeric_scale_null":false,"datetime_precision":0,"datetime_precision_null":1,"has_no_default":false,"default_value_null":false,"srs_id_null":true,"srs_id":0,"default_value":"AAAAAA==","default_value_utf8_null":true,"default_value_utf8":"","default_option":"","update_option":"","comment":"","generation_expression":"","generation_expression_utf8":"","options":"interval_count=0;","se_private_data":"","column_key":2,"column_type_utf8":"int(11)","elements":[],"collation_id":33,"is_explicit_collation":false},{"name":"titulo","type":27,"is_nullable":false,"is_zerofill":false,"is_unsigned":false,"is_auto_increment":false,"is_virtual":false,"hidden":1,"ordinal_position":2,"char_length":65535,"numeric_precision":0,"numeric_scale":0,"numeric_scale_null":true,"datetime_precision":0,"datetime_precision_null":1,"has_no_default":true,"default_value_null":false,"srs_id_null":true,"srs_id":0,"default_value":"AAAAAAAAAAAAAA==","default_value_utf8_null":true,"default_value_utf8":"","default_option":"","update_option":"","comment":"","generation_expression":"","generation_expression_utf8":"","options":"interval_count=0;","se_private_data":"","column_key":1,"column_type_utf8":"text","elements":[],"collation_id":33,"is_explicit_collation":false}],"schema_ref":"yt_colores","se_private_id":18446744073709551615,"engine":"MyISAM","last_checked_for_upgrade_version_id":0,"comment":"","se_private_data":"","row_format":2,"partition_type":0,"partition_expression":"","partition_expression_utf8":"","default_partitioning":0,"subpartition_type":0,"subpartition_expression":"","subpartition_expression_utf8":"","default_subpartitioning":0,"indexes":[{"name":"PRIMARY","hidden":false,"is_generated":false,"ordinal_position":1,"comment":"","options":"flags=0;","se_private_data":"","type":1,"algorithm":2,"is_algorithm_explicit":false,"is_visible":true,"engine":"MyISAM","elements":[{"ordinal_position":1,"length":4,"order":2,"hidden":false,"column_opx":0}]}],"foreign_keys":[],"check_constraints":[],"partitions":[],"collation_id":33}}

Options: ReplyQuote
Re: DataBase Server is MySql instead Localhost
Posted by: Otomatic (Moderator)
Date: June 15, 2020 07:56PM

Hi,

> I´m not sure.... but I thinkg was recently... like a 3 month ago....

With which version of MySQL?

> mysql_version_id":80018,"created":20200604163912
Created by MySQL 8.0.18 on June 4, 2020, i.e. eleven days ago, not three months ago.

You're telling me about the rifles...

You've screwed up and you don't want to take responsibility. I repeat that the only way to transfer databases is to export/import SQL files between the two DBMS.
On this subject, see the message below that talks about transfer between two computers, but it's exactly the same principle between two versions of MySQL :
[forum.wampserver.com]

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: DataBase Server is MySql instead Localhost
Posted by: jamarchi (---.ct.co.cr)
Date: June 15, 2020 10:25PM

Hi

No man... sorry... I tried to say that I installed wamp 3 month ago... the information of that DB yes is recently

because it's one of the last DB that I created, sorry for the confusion.

So in other words.... there aren´t any other way to access that databases only that way that you said ?

Options: ReplyQuote
Re: DataBase Server is MySql instead Localhost
Posted by: WarriorGov9791 (---.hawaii.res.rr.com)
Date: June 16, 2020 07:12AM

Hello jamarchi,

Sorry to jump in on your thread. Unless you have a backup of the WAMPSERVER installation that had "working" copies of your databases, I'm afraid you won't be able to recover them.

This is drastic, but worth a shot. You can try doing a system restore of your PC to a point when you were able to access your databases. From there, export your databases (follow the instructions posted in otomatic's link). Save the sql files to a usb drive. Undo the system restore. Now try importing the files you saved .

Note: Prior to doing the system restore, create a manual restore point just in case something goes wrong. That will be your point of reference to undo any damage that may come about.

It is important to backup databases prior to upgrading MySQL or MariaDB. The only way to do that is to use the Export feature in phpMyAdmin. To reload databases after upgrading, use Import.

Hope this helps. Let us know how things turn out. Aloha!



Edited 1 time(s). Last edit at 06/16/2020 07:16AM by WarriorGov9791.

Options: ReplyQuote
Re: DataBase Server is MySql instead Localhost
Posted by: Otomatic (Moderator)
Date: June 16, 2020 10:05AM

Hi,

> I copied this folder C:\wamp\bin\mysql\mysql8.0.18\data and paste it in the new instalation

According to what you wrote above, you still have the old version of Wampserver.
Deactivating the current version of Wampserver and reactivating the old version is a matter of three command lines and six mouse clicks, but still we should not have pulling teeth to get this information.

If you want to have a chance to recover your databases, don't you think it would be better to explain us the exact history of what you did, if you still have the old version of Wampserver, etc.?

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: DataBase Server is MySql instead Localhost
Posted by: jamarchi (---.ct.co.cr)
Date: June 16, 2020 07:13PM

Hi man...
Ok I will tell all what I did with this problem

When I saw the problem that I could´t connect to the DB server, I copied the data folder ( C:\wamp64\bin\mysql\mysql8.0.18\data) and pasted in the desktop, I thought that the correct best way to have them in a new installation.
So I uninstalled wamp and reinstalled again and then copied that folder in the new instalation but this didn´t worked, this is what i did, so, you maybe ask, Why did you do that ?, well I read in tha webpage and I thought that this process will helped me



Edited 1 time(s). Last edit at 06/16/2020 07:13PM by jamarchi.

Options: ReplyQuote
Re: DataBase Server is MySql instead Localhost
Posted by: Otomatic (Moderator)
Date: June 16, 2020 07:34PM

Hi,

Now, I'm afraid that's it and we can't retrieve the databases.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: DataBase Server is MySql instead Localhost
Posted by: WarriorGov9791 (---.hawaii.res.rr.com)
Date: June 17, 2020 02:11AM

Quote
jamarchi
When I saw the problem that I could´t connect to the DB server, I copied the data folder ( C:\wamp64\bin\mysql\mysql8.0.18\data) and pasted in the desktop, I thought that the correct best way to have them in a new installation.
So I uninstalled wamp and reinstalled again and then copied that folder in the new instalation but this didn´t worked, this is what i did, so, you maybe ask, Why did you do that ?, well I read in tha webpage and I thought that this process will helped me

Do you have a system restore point in Windows that contains a working version of WAMP that allowed you access to your databases? If yes, that may be your only chance of recovering the databases. If not, otomatic's post above sums it up.

Options: ReplyQuote


Sorry, only registered users may post in this forum.