I am using MYSQL 8.0 on Windows and I cannot load files into the database from my computer. I get error 1290 "server running with secure-file-priv". I have spent two days working on this already and have gone over almost a dozen different answers here but none of them work. I have gone into the my.ini file and manually set "secure-file-priv" to "". Then when I check on the MYSQL workbench Options File under the Security tab it indeed shows a blank destination for "secure-file-priv". I have tried unchecking or checking the "secure-file-priv" on that Options File too and it makes no difference. When I run the query "show variables like 'secure-file-priv' it gives no results. Does anyone have an idea of what I can do to fix this?
Related
I'm running MySQL with DBngin and i get this error. It seems that laravel can't even connect to the database.
SQLSTATE[HY000] [2006] MySQL server has gone away
I saw that increasing the 'max_allowed_packet` the issue can be solved but i haven't found a way to do that in my case.
i downloaded mysql-client and after i connected to my database, i tried to set the max_allowed_packet
set global max_allowed_packet=16000000;
But for some reason it doesn't change, I checked that with
SHOW VARIABLES LIKE 'max_allowed_packet';
This can also be changed in the my.cnf file but because i am running MySQL with DBngin i couldn't find the configuration file. I know that i can set a custom configuration file in DBngin but i'm not sure what else i should include in that file besides the max_allowed_packet in order to make it work.
Any ideas ?
new stackflow user here.
Im also new with SQL and learning to use it with MAC OS and MySQL Workbench 8.0.
My problem is that I cant change secure_file_priv value. Its NULL and stays NULL no matter what.
I have tried to use tips and tricks found from stackoverflow but the value stays the same whatever code I try to put in terminal.
Basically if I start with /usr/local/mysql/bin/mysql -uroot -p in terminal. Is this wrong start?
Because after typing that in, all I have managed to do in terminal is 'show variables;'.
Any other code I've found from internet (regarding this problem) doesn't return anything.
Idea behind everything is to use LOAD DATA INFILE function in MySQL Workbench. But error 1290 denies that. Or LOAD DATA LOCAL INFILE which returns error code 3948
Thanks in advance.
I am trying to load data localy from pc to MySQL database ('texnologialogismikou') but I get a lot of errors. I searched a lot in forums and in MySQL site but I couldn't find a solution.
I tried to change variables, move the file in the Workbench directory and some other things but nothing worked.
load data local infile 'C:\Users\Mattheos\Desktop\ActualTotalLoad-10days.csv'
Into table texnologialogismikou.actualtotalload
fields terminated by ';' enclosed by '\"' lines terminated by '\n'
Some of the errors I got:
Error Code: 2. File 'C:ProgramDataMySQLMySQL Server 8.0Uploads' not found (OS errno 2 - No such file or directory)
Error Code: 1148. The used command is not allowed with this MySQL version
Error Code: 1290. The MySQL server is running with the --secure-file-priv option so it cannot execute this statement
P.S. I know that there are posts like this but this is the last thing I could do. I tried everything I could find and nothing worked.
On mySQL worckbench at the Manage Server Connections window -> Select your connection -> Go to the Advance tab and insert OPT_LOCAL_INFILE=1 in the others textinput.
The last error message is the relevant one:
Error Code: 1290. The MySQL server is running with the --secure-file-priv option so it cannot execute this statement
The --secure-file-priv option restricts from which directory files can be loaded, as explained in the documentation:
If set to the name of a directory, the server limits import and export operations to work only with files in that directory.
You can display the configured directory with:
show variables like "secure_file_priv";
Just move the file to import to that directory, and run the load statement again.
try mysqlimport
https://dev.mysql.com/doc/refman/8.0/en/mysqlimport.html
or Try community edition of tools like Pentaho ETL which will load data really fast.
I'm using tt-RSS as an rss reader running on a raspberry pi. Lately it's been running really slowly so I checked the logs to see the below error appear when starting mysql
Can't open and lock privilege tables: Incorrect file format 'servers'
So I googled it and found a post saying to use the skip-grant-tables option and repair the database(s) Post. I got as far as running the first command in the answer and now mysql doesn't work. It appears to be running but whenever I run mysql I get the following message mysql: unknown option '--skip-grant-tables' before being sent back to the prompt.
I cant seem to find any reference to this error anywhere and I cant seem to disable the skip grant tables option to go back.
I've rebooted the machine, restarted mysql and mysqld services and looked in the my.cnf file, where it does say [client server]
skip-grant-tables
If I remove that option and restarted the computer/services then mysql fails to start completely. Otherwise I'm stuck at the above error.
Any help in fixing the error and getting mysql working again would be much appreciated.
I cannot log in to my mySQL database server anymore.
I am currently using WAMP 2.2 on Windows 8.1 64 bits.
I tried reinstalling WAMP server but the problem still persists.
I have also edited the config.inc.php file and changed the host name from 'localhost' to '127.0.0.1'; however the problem still exists.
I found the problem, eventually. It had nothing to do with any of the configuration files though.
My ESET Smart Security antivirus updated silently and blocked the mysql application. I did not even get a notification for it!
I figured it out when I tried logging in to phpMyadmin after turning off my antivirus.
I had to allow communication for mysqld.exe in the antivirus settings.
Using the Wampmanager menus take a look at the mysql error log.
left click wampmanager -> MySQL -> MySQL log
If that does not show any [error] messages then also have a look at the 'Windows Event Viewer' in the 'Application' section for messages from MySQL.
The normal problem is a rogue 'my.ini' or 'my.cnf' file on your system. Search for these 2 files in the C;\windows folder, if you find any then delete them.
DO NOT DELETE THE my.ini FILE FREOM ANYWHERE IN THE C;\WAMP folder structure.
Recently I encountered a problem with MySQL, It was showing an error “Error : 1067 the process terminated unexpectedly” when I tried to start the service in services.msc
So I googled it but didn’t found the perfect solution. I will show how can you debug the issue. First look for file my.ini which can be found in “C:\wamp\bin\mysql\mysql5.6.17″ , open that file on look for “log-error”, this will show you the path where error log is stored. In my case it is, “c:/wamp/logs/mysql.log”.
Open the log file and look for last error you got, you should be today’s date when you tried to start the wampmysqld from services. At this stage, you will get error and understand what it say. In my case it is,
enter image description here
The folders for all databases are in “C:\wamp\bin\mysql\mysql5.6.17\data”. To fix I moved kmk folder to some other place. After this, wampmysqld in services.msc is getting started without any error.