How to bring back my database to wamp sever? - php

My server got crashed today morning, so before re-installing it I just copied the folder where my localhost was running so that my databases are not lost and trust me I preserved it safely. Now its re-installed and now my localhost is working but all I want is 'employee' database back to its place. How do I get it?
I copied the folder employee and saved back to where it was but its of no use. Am still stuck.
Reminding you, I didn't export it before re-installing. So can someone tell me how to face this situation?

Ok so assuming you did do a complete backup of the old wampserver folders you can try this.
First make sure you stop all service via wampmanager
wampmanager -> Stop all Services
Now make a backup of this folder on the newly installed WAMPServer, so you can return to a vanilla, just installed state if this does not work.
move \wamp\bin\mysql\mysql5.6.17\data \wamp\bin\mysql\mysql5.6.17\data_vanilla
Now copy your backed up MySQL folder from the Previous installations files to the new install
copy \old_wamp\bin\mysql\mysql5.6.17\data \wamp\bin\mysql\mysql5.6.17\data
Now lets clear the mysql log file, so you dont get confused between old and new message in the log.
move \wamp\logs\mysql.log \wamp\logs\old.mysql.log
You should now be able to restart the MYSQL service and see if it starts up cleanly.
wampmanager -> MySQL -> Service -> Start/Resume Service
Now if the wampmanager icon goes Orange, MySQL should have started. Check the mysql error log, to see if all is well.
wampmanager -> MySQL -> MySQL log
If all is well, you can now start Apache as well.
wampmanager -> Apache -> Service -> Start/Resume Service
The wampmanager icon should go green.

You need to import it back using phpmyadmin.
open localhost/phpmyadmin
select database then click import
locate the database and click go
You probably can find the data that you back up earlier in here, \wamp\bin\mysql\mysqlXX\data

when planning to recover, you should save the entire data directory . not just the folder with the database name .
refer the thread on superuser.
go to data directory of mysql (C:\wamp\bin\mysql\mysql5.5.24\data )
Find a file called "mysql-bin.index"
Rename that file to "mysql-bin.index-corrupt"
Restart the server and it will work fine, all your database will be where you left them.
or this thread on stackoverflow .
INNODB databases will have been stored in the
\wamp\bin\mysql\mysql5.6.17\ibdata1 file.
There will also be info in a
\wamp\bin\mysql\mysql5.6.17\data\DATA_BASE_NAME\ folder, one .frm file
for each table that was in the database, but this is basically just
schema information and not actual data.
If you do not have that file from the old install then your data is lost. check this super user thread for further details .

Related

Prestashop doesn't installs

I have xampp with PHP 7.3.2 installed on Windows 7.
I extracted the zip file that I downloaded from Prestashop website and I extracted it;
After doing that everything went fine except that on the "Store Installation" step I saw this error:
An error occurred during installation...
You can use the links on the left column to go back to the previous steps, or restart the installation process by clicking here.
1: Unable to write into "en-US"" (data layer : "PrestaShop\PrestaShop\Core\Localization\CLDR\DataLayer\LocaleCache")
Already tried to restart installation, deleting the whole folder and then re-extract the archive
Screenshot:
Screenshot
I think error happens at copy files start, it may be a permission files problem.
Try to set read and write permissions to everybody on PS installation directory.
EDIT:
In Windows 7 click right button mouse on folder and select Properties. Click on Security tab and here you can set users' permissions.
About install in a Flash Drive, FAT32 does not support permission management. Format it with NTFS or install on hard disk.

phpMyAdmin on macOS: where does it save config.inc.php?

Downloaded the latest phpMyAdmin to be used on macOS 10.15 Catalina (local webserver), extracted the phpMyAdmin files to my web root.
During the setup I chose config authentication and now when I visit the setup page I'm getting some mysqli error.
I deleted the entire phpMyAdmin/ dir and wanted to start all over again. However to my surprise, the previously entered (incorrect) server details are still there.
I would assume the any config.inc.php would be saved within phpMyAdmin's own dir, but apparently it's saving this data somewhere else.
How/where can I find it, so I can delete it and truly start a complete new phpMyAdmin setup from scratch?
P.S. I already tried:
/etc/phpmyadmin/
/usr/local/phpmyadmin/
/usr/local/etc/phpmyadmin/
/usr/local/opt/phpmyadmin/
But neither of these dirs exist.
If you've simply downloaded the phpMyAdmin file yourself and uncompressed it to your web root, then the config.inc.php file goes in that phpMyAdmin folder. If you've used brew or some other package manager, they each have their own location for configuration files, but that doesn't seem to be the case here.
It's not clear why the old server details have been retained, maybe your browser has cached the old page or something, but the only place that phpMyAdmin looks for the configuration is in the main folder. Is there a chance you're seeing the defaults, rather than some custom setting? (The defaults would be to use auth_type cookie connecting to host 'localhost').
What is the specific mysqli error message you're seeing?

Xampp recover DB

So basically today I uninstalled xampp and didn't realised that I deleted my database. I was supposed to reinstall xampp. Luckily I got my old files back via ShadowExplorer but other problem came with old database files. When I import them back to .../xam/mysql/data/ directory it showes me that : Error image
Also here is my folder : Database folder
I'm guessing that I forgot to make some additional changes
Install same version of XAMPP (Don't use new version or another version.)
Create a folder into xampp/mysql/data ("Old database name" like this xampp/mysql/data/db_restore), Copy all files like *.frm + *.ibd & etc into your created folder (xampp/mysql/data/db_restore).
Start MySQL.
Connect to your MySQL, Open db_restore database, Generate a SQL backup.

How to repair wamp server without re-installing?

After making changes in php.ini by uncommenting
extension=php_openssl.dll
My Windows-8 system got shutdown due to power failure and later i use to get this error when i try to start wamp server
Later visiting some link i added the below code to wampmanager.ini file as it was empty
Now the first error got fixed and now throwing this error mentioned below:
Later i also installed visual c++ 2008 to fix this error but unsuccessful. I have many important databases which i have not taken back up also. I am trying to repair this wamp server without re-installing. Can anybody please assist me with this.
Thanks in Advance
go to the wamp/scripts folder
open console
run:
php refresh.php
this should recreate wampmanager.ini
(requires wampmanager.tpl file in wamp folder.
taken from http://sourceforge.net/p/wampserver/feature-requests/10/#750b)
This document may help you How to uninstall WAMPServer without actually uninstalling it
The idea is that you uninstall your current version without actually running the unninstall and without actually deleting any files from your existing install.
You then rename the current wamp folder and then install the same version of wamp, make sure it works, and then copy all your sites and databases to the new installed wamp. If you install exactly the version of WAMP you have currently then you can copy the whole of the .../mysqlx.y.z/data folder and all you databases and users should be there on the new install.
This gets over whatever damage was done to your existing install. You may need to edit the php.ini and httpd.conf to match your existing configuration. I suggest you do not do a straight copy of either of these files as that may just get you to where you are now.
Fixed by installing wamp again into the same directory by renaming the older wamp. I just replaced wampmanager.ini file of new to the old one. Earlier it was just a little piece of code i pasted in wampmanager.ini file. But now it is a big one which fixed this issue. Thanks a lot for you guys, your suggestions saved my time. I did not change anything with php.ini also.
Backup all YOUR databases in SQL format and store the backups somewhere safe.
Stop All Services.
Remove the Apache Service.
Remove the MySQL Service.
Exit WAMPServer.
Rename your current \wamp folder to \wamp_old (This is your backup. DONT FORGET THIS STEP)
To all intents and purpose, you have uninstalled WAMPServer now.
7. Download and Install the new WAMPServer version
(32bit is recommended, 64bit is only for geeks and 64bit PHP is not yet fully converted to 64bit)
Change NOTHING! Check it works in its out of the box state.
Clear your browser cache ( CTRL+F5 ) to avoid any funnies with cached content.
Run localhost
Run phpMyAdmin (If asked for a Username and password; username = root / password = (nothing, leave this blank)
Run \wamp\www\testmysql.php. you will need to edit the file and change the "mysql_connect('127.0.0.1', 'root', '')"
If you want to bring some/all of your old versions of Apache/PHP/MySQL into the new WAMPServer
(Remember, one of the big advantages in WAMPServer is the ability to switch between versions of Apache/PHP and MySQL)
Apache: copy \wamp_old\bin\apache\apachex.y.z folder to \wamp\bin\apache\apachex.y.z
PHP: copy \wamp_old\bin\php\phpx.y.z folder to \wamp\bin\php\phpx.y.z
MYSQL: copy \wamp_old\bin\mysql\mysqlx.y.z folder to \wamp\bin\mysql\mysqlx.y.z
To tell WAMPServer about the old version of Apache/PHP/MySQL you just copied across run a "refresh",
right click the wampmanager icon -> Refresh
Give it a few seconds to go find all the new versions.
Compare your old configs with the new configs, move over any of your local change/requirements.
Remember, config parameters change between versions of Apache/PHP/MySQL !
Make sure your old changes are still required, valid, legal. ( Check the upgrade notes provided by all 3 software providers )
If it all goes horribly wrong. Check the bottom of this Doc to see how to unwind all these changes easily if you get problems.
help you
I have had the same issue. I am working with WAMP 2.5 version. The content of "wampmanager.ini" is OK but it's possible that the php path is wrong. Check folders of section [StartupAction], in my case my php version is "php5.5.12". Surely the error message "The directory name is invalid" was for this.
In win10 you can just right click on the wampmanager.ini file in the root and select Restore Previous Version, then just choose one from a few days ago when it worked.
i have similair issue in the morning and searched SO and other forums but none of the solution worked for me.
It was
syntax error on line number 561 (due to MariaDB)
After checking all wamp installation for MariaDB, i find out that file at root: wampmanager.conf contain lines about MariaDB. I removed all of those and then restarted wamp. It worked like charm!
Rename the wamp folder, you can just add a 1 or 0 to somehing like wamp641 then
re-install wamp server
3.copy paste the mysql and project folders from Bin and WWW respectively from the renamed wamp folder to the newly created folder after installation so that you dont loose any database and project files from your previous projects.
4 start your wamp and it should work well.

Configure PHP to work with MySQL and phpMyAdmin

My purpose is to setup a forum in php just locally on my Windows 7 machine to test how it works.
I have installed Apache HTTP Server and PHP v5 successfully. Then I downloaded and extracted the phpbb-forum software and put it in my root folder. Then I realized that I needed some kind of database so I downloaded and installed MySQL. To configure my database I also downloaded and extracted phpMyAdmin but I can't get it to work. When I open my browser and navigate to my phpMyAdmin-folder I simply get this:
Screenshot: http://img836.imageshack.us/img836/5139/captureqb.png
I use my Apache server to preview my website where I'm using some php include functions so I know that I've a "working" PHP installation. The MySQL service is also running on my computer.
However, do you need to configure PHP and/or Apache in order to get phpMyAdmin to work properly? I'm a complete noob on this so I suppose it may be multiple shortcomings.
Thank you.. //Realiserad
The simpler way is to install WAMP server : it bundle Apache, PHP, MySQL and PHPMyAdmin preconficurated for work together.
You need to enable the MySQL extension to use MySQL from PHP.
The MySQL extension may or may not be bundled with your PHP distribution. (look for php_mysql.dll in the ext folder)
Assuming it's installed you can enable it by adding or uncommenting this line in your php.ini:
extension=php_mysql.dll
As other people have said it may be simpler to install WAMP Server
Have a look at: http://www.ricocheting.com/how-to-install-on-windows/mysql - Specifically, the 3rd step. It involves downloading the mySQL PHP Extention (which is a dll), and un-commenting a line of php.ini so that PHP Load's the extension.
While is may be simpler to install XAMPP or WAMP, I think that it's good to know how to fix your own problems - Scientia potentia est :D
not very familiar with windows, but it seems like you miss the php-mysql extension, which you can download from here (i think):
http://mysql2.mirrors-r-us.net/downloads/connector/php/index.html
would be alot easier for you to use a preconfigured wamp install like this one (available for win/mac/etc). google "xampp", i'm not allowed to post more than one link due to stackoverflows spam protection.
Configure PHP to Access MySQL
Open the c:\php\php.ini file with your favorite text editor.
Uncomment the following lines by removing the semicolon:
extension=php_mysqli.dll
extension=php_mbstring.dll
extension=php_mcrypt.dll
save and exit editor
After extracting the archive into phpmyadmin folder, you will have to configure phpmyadmin before you can connect to sql server.
you should create a configuration file. This file can be created manually (simply use a text editor),
During your first session you will see an error message.
To solve this problem you should create folder (C:\project\wwwroot\phpmyadmin\config). After that give full rights for IIS_IUSRS group and IUSR user.granting permission/image
Return to the config window. Visit localhost/phpmyadmin/setup/
To configure the connection settings click on the “New Server” button.
Enter the verbose name of the SQL server, and then the server hostname. If necessary, you can specify other settings.[setting up/image][2]
Save the settings and then the server will redirect us to the previous page. Choose:
the default language – English
the default server – 127.0.0.1
end of the line – Windows (\ r \ n)
Click Save, and then download. The received file (config.inc.php) you should save to the root directory (C:\project\wwwroot\phpmyadmin).
Open the authorization window (//localhost/phpmyadmin/) and login under root account. If you see a starting phpMyAdmin window, you can delete config folder.
For the correct work phpMyAdmin requires a database with the information. The script for creating database is already installed.

Categories