Mysql can not load local files - mysql

Error Code: 3948. Loading local data is disabled; this must be enabled on both the client and server sides
show variables like 'event_scheduler'; // this is ON.
I saw a answer is set
OPT_LOCAL_INFILE=1;
but I did not find where can set it.

The file must be at the directory on the server. If you're using MySQL on Windows and the client is running in the same computer, it is no difference, but if your server is on the remote computer, you need the way to put the file in the server, not on the client directory.

Related

Zabbix remote server availability unknown and mysql template not showing

I want to monitorize a remote server on zabbix. The server would be the host and then mysql, rabbitmq... would be created as templates. The first problem is that the availability on the server is unknown. The IP address is the correct one: Image of the hosts on zabbix as you can see on the image, the zabbix_agent host is okay but the other host is unkwnown.
There is another problem. i have configured mysql on the remote server with all the files. (userparameter file and .my.cnf file) but I don't see any data on "Latest Data".
Latest data mysql I don't know why it does not show any data. The template of mysq is configured like this: template configuration
Thank you for your help

MySQL: How to enable load data local on both, client and server sides

I tried to upload a .txt file into MySQL Workbench, but I have the following issue:
Error Code: 3948 Loading Local data is disable; this must be enable on both the client and server sides
Workbench uses a MySQL feature called LOAD DATA LOCAL for this .txt file import operation. Because that feature exposes some security problems in the server, the operator of the server needs to enable that feature, by running the MySQL server software (mysqld, it's called) with a specific system variable called local_infile. Your error message means that flag is not enabled.
You can try enabling it at runtime before you do your upload operation. Try this SQL statement.
SET ##GLOBAL.local_infile = 1;
If that doesn't work you need to ask the person who runs your server to enable it.

Connect a Centura client application to SQL Server

I am new to Centura application configuration
When I try opening the windows client application, which has the Centura sql.ini configuration file. I get the below error.
Can anyone please help me understand the issue?
Error code: 401
Reason: FOR SQLBASE: The specified database cannot be found. SQLBase cannot find the file named "x:\dbdir\dbname\dbname.DBS" where x:\dbdir is either the default, c:\SQLBASE, or modified with the DBDIR SQL.INI configuration keyword. In a multiuser network configuration, this error indicates that your network is working correctly, but the database system was unable to locate the specified database filename.
FOR NON-SQLBASE DATABASES: This problem can also occur with a SQLGateway when leaving out the protocol type in the SERVERNAME parameter that the client uses to communicate with the gateway (like SQLNBIOS).
For example, SERVERNAME=SERVER33,SQLQUEUE DBNAME=DB2DBMS, SQLQUEUE, SQLNBIOS
will not allow a remote client process (using SQLNBIOS on the LAN to communicate with the SQLGateway machine) to connect to the SQLGateway machine.
For SPX connectivity from DOS or MS Windows to a Unixware SQLBase Server check for the omission of the "serverpath=..." parameter in the SQL.INI file under the client section.
Remedy: Verify the database file exists. The default drive letter and dbdirname is c:\SQLBASE unless overridden with a DBDIR SQL.INI configuration keyword parameter. Verify the DBDIR keyword is not missing or pointing to a wrong database directory. Verify the DBNAME keyword is specified for the named database. Verify the SERVER keyword is not missing or conflicting with other network server names. In your CONFIG.SYS file, verify at least 40 files set with the FILES=40 parameter. If the server was being initialized while the connection was tried, retry the connection after the server has initialized. If all of the above fails, try using a different database name or try connecting to the database in single user mode at the same machine. If you can connect with a local engine it probably indicates a network configuration error exists. If you can connect with a new database name it probably indicates a previously named database was never properly initialized.

Cakephp is not establishing a database link

I have a cake installation on a webserver and a database on a separate server.
I am able to connect to the database remotely via shell, but my cake gives
Error: Mysql requires a database connection
Error: Confirm you have created the file : app/Config/database.php.
Notice: If you want to customize this error message, create app/View/Errors/missing_connection.ctp.
I checked and PDO is setup, mod_rewrite is enabled and I have a similar setup on development server running properly. I checked core.php and it echoes proper base site url, and database.php echoes proper database selection.
Any ideas what may be causing it?
Trying to cover all of the possibilities...
With regard to the database.php file, make sure that the database credentials are being set to the $default variable and not $test, unless of course you're trying to run database unit tests of course.
The file that handles all of the initializing is the webroot's index.php file. You'll want to verify that all paths within that file are using the proper paths. If all you did was extract the CakePHP framework without any folder rearrangements, it should be all correct.
You mention that you checked mod_rewrite is enabled - did you do this with a phpinfo() call to a file located on the same (sub)domain just to verify the settings in the same location?
Although not related to the errors you're experiencing, you'll also want to verify that the external DB allows connection from your webserver's IP.

Connecting to MySQL Database

I have imported a database over to MySQL in phpMyAdmin. I am performing my work locally using WAMPSERVER (localhost).
Before I imported the database, I was getting the error Database not found. Now that I have added the database in localhost. I am getting the following error in the browser when I go to index.php
SSL connection error
Unable to make a secure connection to the server. This may be a problem with the server or it may be requiring a client authentication certificate that you don't have.
Error 107 (net::ERR_SSL_PROTOCOL_ERROR): SSL protocol error.
Here are some details about the config file, if it helps:
I haven't changed the .htaccess file. I do however have a config file that looks like this:
<?php
if($_SERVER['REMOTE_ADDR']=="127.0.0.1")
{
$DB_HOST="localhost";
$DB_USER="root";
$DB_PASS="";
$DB_NAME="dbName";
$site_url="http://localhost/folder/";
$doc_root=$_SERVER['DOCUMENT_ROOT']."/folder/";
}
else
{
$DB_HOST="localhost";
$DB_USER="root";
$DB_PASS="password";
$DB_NAME="dbName";
if($_SERVER["HTTPS"]=="on")
$site_url="weburl";
else
$site_url="weburl";
$doc_root=$_SERVER['DOCUMENT_ROOT'];
}
You don't need to use https:// when you are running it in you local machine. Because you can't have SSL certificate for your local machine, isn't it?
Try: http://localhost/myfolder/index.php instead.
You probably don't have https on.
And you're having issue going to http:// since you already went to https:// in your browser (Chrome is my guess). Try clearing your visited sites or history and it will work just fine. Or you may try it in another browser.
Also, it is possible that you may have edited an .htacess file to redirect or installed a php framework with https on.