Recently I uninstalled the Wamp Server and re-installed the newer version of Wamp Server which is 3.1.3
Note: I am using Windows 10
Below are all the details of Wamp Server:
Apache Version: 2.4.33
PHP Version: 5.6.35
MySQL Version: 5.7.21
phpMyAdmin Version: 4.7.9
When I click on MYSQL Database in phpMyAdmin and then click on Export, the phpMyAdmin shows blank page. However, when I click on Import, phpMyAdmin doesn't show blank page at all. But the strange thing is when clicking on Export, phpMyAdmin shows Blank Page.
Since, I'm trying to export a Database from phpMyAdmin, I need to make sure that the page doesn't go blank when clicking on "Export" button.
I'm not sure regarding how to approach this problem because I'm very new in phpMyAdmin.
Would be really helpful if any recommended advice or solution is provided.
If you want to export the database using Command Line, then in that case, you can use mysqldump command.
If it's an entire DB, then:
$ mysqldump -u [uname] -p[pass] db_name > db_backup.sql
If it's all DBs, then:
$ mysqldump -u [uname] -p[pass] --all-databases > all_db_backup.sql
If it's specific tables within a DB, then:
$ mysqldump -u [uname] -p[pass] db_name table1 table2 > table_backup.sql
You can even go as far as auto-compressing the output using gzip (if your DB is very big):
$ mysqldump -u [uname] -p[pass] db_name | gzip > db_backup.sql.gz
uname - Username of database
pass - Password of database
You can check this answer
If you are using Windows then you need to change directory to C:\wamp\bin\mysql\mysql-version\bin and do above steps.
If you're using Ubuntu.
That problem caused by, you have not installed libapache2-mod-php.
So, install with :
$ sudo apt install php libapache2-mod-php
then restart apache
$ sudo service apache2 restart
Related
I have installed XAMPP on macOS with m1 chipset, and I am unable to run it through console, I have read several articles but all I was able to accomplish is that when I type source ~/.bash_profile I get /Applications/XAMPP/bin/php instead of /usr/bin/php but when I type mysql -p root -u and then show databases it does not show me preinstalled by XAMPP databases and on window it did, like the path was leading to some other directory than the one with the app installed but it kind of shows corect one, could you please advise me on that? This is my ~/.bash_profile
export XAMPP_HOME=/Applications/XAMPP
export PATH=${XAMPP_HOME}/bin:${PATH}
export PATH="~/.composer/vendor/bin:$PATH"
export PATH
I am an Java developer new to MySQL.
I want to perform Load data operation using PHPMyAdmin. Load data scripts are verified as it worked pretty well on my Windows OS configuration.While trying to load data from CSV, i am getting :
The used command is not allowed with this MySQL version
Version details is as follows
Mysql Server version: 5.5.34-0
OS : ubuntu0.13.04.1 (Ubuntu)
I am done with editing the my.cnf as follows:
[mysql]
local-infile =1
#no-auto-rehash # faster start of mysql but no tab completition
.......................
[mysqld]
#
# * Basic Settings
#
local-infile =1
user = mysql
.........................
[client]
loose-local-infile=1
root
port = 3306
.........................
I have tried restarting apache and mysql multiple times using -
sudo service mysql restart
sudo service apache2 restart
Nothing worked for me that help me to perform the operation using phpmyadmin. While using below command
mysql -u root -p --local-infile test
I am able to perform the Load data operation successfully through mysql prompt. Since i have multiple CSV in chunks and SQL load scripts for each chunk so i want to run it as a whole(load scripts seprated by $) in one go using phpmyadmin.
Please help me to solve this problem.
I have already gone through below answers on stack overflow
ERROR 1148: The used command is not allowed with this MySQL version
LOAD DATA LOCAL INFILE gives the error The used command is not allowed with this MySQL version
[UPDATE]
Variable local_infile is showing as 'ON', I have verified this using SQL query on phpmyadmin
SHOW VARIABLES LIKE "local%"
Load script
LOAD DATA LOCAL INFILE 'full_dir_path/man_final.csv'
INTO TABLE `manufact_t`
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
ESCAPED BY '\\'
LINES TERMINATED BY '\r\n'
IGNORE 1 LINES
(man_sr,man_name, address, phone, fax, email, url,subdivision, #man_parent, man_id)
set man_parent=0;
my friend. There can be few reasons of this error.
php.ini has wrong value for mysql.allow_local_infile. Must be - mysql.allow_local_infile = On
If you are working locally you can try to remove the LOCAL from your SQL query. Maybe MySQL server settings just don't allow you to use the LOCAL keyword
Only if you use cPanel: The problem is the phpMyAdmin that is built into the cPanel interface doesn't use the php built with apache. So you can rebuild apache all day long and it will not change how php is compiled [from cPanel forum]
Hope this will help you.
My friend,
kindly us the following steps:-
Firstly, remove any current installations of MySQL server
run command in terminal sudo apt-get --purge remove mysql-server
go ahead and obtain the source files and other packages required to compile and install the source.
run command sudo apt-get install mysql-source-5.5 build-essential libncurses5-dev cmake
5.Go to the directory where the source is.
The best part while installing from source is that you may configure as per your need like DENABLED_LOCAL_INFILE
Kindly follow below link:-
http://www.sudo-juice.com/install-mysql-5-5-from-source-ubuntu-linux/
I have fixed this problem by removing LOCAL keyword. Please remove LOCAL keyword from the command, it will work for mysql server version 5.5.34-0.
When i connected mySQL databases to dreamweaver I only saw the default databases, none of the ones I created in myPHPadmin, I am running MAMP 2.2 on Mac OS X 10.7.5 Dreamweaver CS6, I am going to the databases icon on the right side of the screen in "App Developer Plus" viewing mode. I am trying to add a database with mySQL connection:
Connection Name: registration, mySQL server: localhost, Username: root, Password: my set password, Database <--- here is the error when I click select; it does not show the databaes I made in myPHP admin. called Registration and Dbank; I'm expecting to see these databases as I can see them in myPHPadmin. but in Dreamweaver after connecting to mySQL i only see: information_schema. mysql, performance_schema, and test.
Nothing seemed to work.. so I thought it could be an error created when i had installed mysql before installing MAMP, So i removed mysql standalone, and when I removed mysql, the databases no longer connected at all in dreamweaver. I got an error:
MySQL Error #2002
No such file or directory so THEN I have tried
Formating my computer and reinstalling all Dreamwweaver, MAMP, and re-enabling everything --> SAME ERROR :(
Setting the path in terminal to include /Applications/MAMP/Library/bin/mysql in .bash_profile --> SAME ERROR :(
In Terminal doing:
cd /var/
sudo mkdir mysql
cd (to get back to root)
sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock
--> SAME ERROR :(
Why can't Dreamweaver just connect to the databases.? PLEASE HELP!
I am setting up my first data base using XAMPP. I followed the steps from
dev.mysql.com/tech-resources/articles/mysql_intro.html
but as I try to connect to mysqlserver by typing "mysql -u root" into my Terminal I get back an error message:
Phosphoros:~ Arthur$ mysql -u root
-bash: mysql: command not found
Phosphoros:~ Arthur$
I am using Mac OS X 10.7.5.
How can I connect to the server?
Arthur
Your terminal application doesn't know where to locate the mysql program.
For example, if you installed xampp in C:/xampp, you open a command prompt, cd to C:/xampp/mysql/bin and then run your command, which should work now.
Edit: Just remembered you mentioned OSX, regardless, use the same principle. In your terminal, cd to the XAMPP install subfolder which contains the mysql executable app
you have to run the command: mysql -u root in the mysql directory that exists in the /opt/lampp directory.
I would like to update data for every action (insert, update, delete) that happens on a localhost MySQL server to a remote MySQL server. How would I do that?
Enable database replication. It's not a great idea to flush frequently for performance reasons, but maybe it's an acceptable tradeoff?
Can't you use Triggers?
22.5.5: Is it possible for a trigger to update tables on a remote server?
Yes. A table on a remote server could
be updated using the FEDERATED storage
engine.
From : http://dev.mysql.com/doc/refman/5.0/en/faqs-triggers.html#qandaitem-22-5-1-5
I wouldn't recommend this because you will be consuming bandwidth for every small change you do. You can try a scheduled job instead.
Here is a simple and safe solution using a git server and works fine if the two db_tables don't change that much and don't have to be identical at all times.
Create a repository on your git server (GitHub, Bitbucket, other)
Clone the repository to both your servers
On the server you want to export from run those terminal commands
$ cd /my/repository/path
$ mysqldump -h localhost -u User_Id -pPassword DB_name Table_Name > Table_Name.sql
$ git add .
$ git commit -m "Table Update"
$ git push https://git_server/repository/name
The db table is now on the git server.
On the server you want to import to
$ cd /my/repository/path
$ git pull https://git_server/repository/name
$ mysql -h localhost -u User_Id -pPassword DB_name < Table_Name.sql