WAMP phpmyadmin 414 error - mysql

i am getting the error as follows.
414 Request-URI Too Large
need to change wamp settings from get to post. how can i do this?
i am using my wamp server to execute an import query on a very large data.
thank you.

If your database is very large it is much better to use the command line processor.
Go to wampmanager -> MySQL -> Mysql console
This will open a command window and log you into the mysql command processor. You may need to enter the password for 'root' or leave it blank if you have not set one yet.
Then use this command to get the mysql processor to read your backup file and execute all its commands :
source /path/to/your/backup/file.sql
simple and it will run for as long as is required to complete the restore.

Related

How to fix en error when running an SQL Script in MySQL Workbench?

I made an SQL Script (I checked it for errors and everything was fine). After that, I opened it in MySQL Workbench. I wanted to run it to view my query results. I clicked: File - Run SQL Script. I selected my file and it came up with an error:
error calling Python module function SQLIDEUtils.runSQLScript
What should I do to successfully run my script file?
In the MySQLWorkbench, instead of File > Run SQL Script, could you try to use File > Open SQL Script followed by Query > Execute (All or Selection)? This way, you should see an output from each query of the schema.sql script.
You could also try to use the mysql command (from a command line) instead. Or, splitting the schema.sql into smaller chunks to isolate the problem.
If nothing work I suggest you check the MySQL Workbench installation.
i think you are not logged in mysql server
solution
after downloading mysql workbench and mysql server
2.when you are open mysql workbench left-downside see there mysql connections click on that
3.enter username and password
4.query Execute-all will start working
I also had this problem, turns out I was simply not connected to the Local instance of MySQL. All I had to do was open MySQL Workbench > Toolbar > Database > Connect to Database > Stored Connection (choose local instance mysql) > ok. If it asks for root password, it's just your windows user password.

Delphi + MySQL command line

I'm building a tool using Delphi and MySQL to restore a script generated with MySQLDump.
It was supposed to load and execute a SQL file and log any possible errors into a given output file.
I thought about execute the mysql command line and send command lines but i don't know if its possible ou how to do it since I just know how to call mysql using windows cmd and execute a single command line using ShellExecute or CreateProcess
I tried to do it with a single command line but it did'nt logged the errors properly
I tried this:
cmd /c mysql.exe --user root < "C:\restore.sql" > "C:\restore_log.txt"
the content of restore.sql was:
drop database test;
It does execute my script, but on the second attempt it should log "database doesn't exist" but restore_log.txt was empty
It would help if anyone could point the way to call mysql and send multiple lines OR a help with my cmd line to log properly
Anyone can help me?
I don't know what components you've got available to connect to the MySQL db, but using TADOQuery to access SQL Server, I simply load up the queries into a TADOQuery's .SQL property and then call Open or ExecSQL. As long as it's just vanilla SQL that was generated by SQLDump, I'd guess that should work. It's worth a try anyway.
digging more at stackoverflow I found previous answers that helped, the difference is that the output goes to a Memo that I can save to a file.
Thank you all for the help and the insights.
The answers can be found on the following links:
Getting output from a shell/dos app into a Delphi app
How do I run a command-line program in Delphi?
Getting output from a shell/dos app into a Delphi app

MySQL Workbench: Assertion Failed wb->get_root().is_valid()

I had run a query on MySQL workbench and after running for a long time MySQL Workbench crashed. Ever since, when I try to open MySQL Workbench it says gives an error saying assertion failed.Attached is the screen shot of the error message
Could you please help me with this.
Regards,
Kiran
Very likely is that your settings xml and/or connection xml has been corrupted. To fix this rename or remove wb_options.xml and/or connections.xml from the MySQL data folder before you start WB next time. Those files will be recreated if they don't exist, but you lose any custom settings + your set-up connections.
On Windows this folder is under C:\Users\<username>\AppData\Roaming\MySQL\Workbench.

mysql chef database recipe fails on large file

"MySQL server has gone away". Hmm.
I am using vagrant and chef to setup my virtual development environment. I'm almost there, but on the last step chef fails when attempting to execute my external db_setup.sql file. I can execute this same script by SSH'ing into the virtual server and it installs without difficulty.
This is my problem code (in cookbooks/database/recipies/mysql.rb file):
# Query a database from a sql script on disk
mysql_database 'run script' do
database_name 'my_db'
connection mysql_connection_info
retries 3
sql { ::File.open('/vagrant/db_setup.sql').read }
action :query
end
The file is 6.9mb and the error I receive when I run vagrant provision is:
==> default: [2014-08-24T16:04:53-07:00] ERROR: mysql_database[run script]
(database::mysql line 50) had an error: Mysql::Error: MySQL server has gone away
For what it's worth, when I replace the db_setup.sql file with a smaller, simpler file that just creates a few empty tables, it executes without difficulty.
Any suggestions? Thank you in advance!
Many, many things can cause this error. In my experience it's usually an SQL file of over 1MB, or, the wait_timeout in your servers my.cnf is set very low (sixty seconds) needs properly tuned. When deploying my.cnf try a wait_timeout 86400 and a max_allowed_packet of "enough" to import that file.
For example:
[mysqld]
wait_timeout = 86400
max_allowed_packet = 1GB
PS. I would not recommend this high of parameters in actual production.
I worked around this issue by getting Chef to leverage the mysql command line tool instead of using Ruby to read the .sql file.

Difference In Phpmyadmin Mysql web client and Terminal client

I got problem (#2006 Mysql server gone away) with mysql while connecting and performing some operations through web browser.
Operation Listed below:
When Executing big procedure
Importing database dump
When Access some particular tables It immediately throws "Server gone away".
Refer this question for Scenarios: Record Not Inserted - #2006 Mysql server gone away
Note : The above operations are works fine when I perform through terminal.
I tried some configuration as googing stated. That is set wait_timeout, max_allowed_packet. I checked for the bin_log but it is not available.
But the issues will not rectified.
What is the problem & How can I figure out & fix the issue?
what is the different between access phpmyadmin mysql server from web browser and terminal?
Where I can find the mysql server log file?
Note: If you know about any one of the above questions. Please post here. It would be helpful to trace.
Please help me to figure this out..
Thanks in advance...
Basically nothing except phpMyAdmin is limited by PHP's timeout and resource limits (limits to keep a runaway script from bogging down your entire machine for all eternity; see the docs for details of those values. In some cases, you might be authenticating through a different user account (for instance, root#localhost and root#127.0.0.1 aren't the same user), but as long as you're using a user with the same permissions the differences are minimal.
You can read more about logs in the MySQL manual, note that "By default, no logs are enabled (except the error log on Windows)".
Below are answer for question
From my research the problem is that browser have some limit to disconnect the connection i.e timeout connection. So that the above problem raised.
To resolve this problem
Go to /opt/lampp/phpmyadmin and open config.inc.php
add the command $cfg['ExecTimeLimit'] = 0;
Restart the xamp server. Now you can perform any operations.
`
2. Web client is differ from terminal because Terminal client will not getting timeout. Terminal client maintain the connection till the progress completed. I recommenced to use command prompt to import/export/run process by safe way.
Basically phpmyadmin will not have any log file. If you wanna see warnings and error you should configure the log file.
Configuration steps:
Go to /opt/lampp/etc/my.cnf
Add log_bin = /opt/lampp/var/mysql/filename.log
Restart the xamp server. You can get the log information.