Good day. I would like to seek for help regarding importing a .sql file on phpmyadmin on xampp. I can access my phpmyadmin via network however when I'm trying to import a .sql file it doesn't connect to the server. Export is possible.
This is my settings of the http-xampp.conf on xampp
<Directory "F:/xampp/phpMyAdmin">
AllowOverride AuthConfig
Order allow,deny
Require local
Require ip 10.10.10.100
Allow from all
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</Directory>
Hi common problem this is....this bug can occure from below:
1.if your importing file is more thn 250kb it won't import
2.another case is observe once inside ur file if there is any error like use database cmd and all....if its possible pls send ur error name let me see once
Thank u
Related
I have 2 pcs connected to LAN.
Want to access the DB one of them. i can see the DB from entering URL "ipAddress:port/phpmyadmin".
But, when firing the queries i am unable to reach that DB or that pc i don't know?
In xampp "httpd.conf" file has also changed ServerName to below
`ServerName ip_address:8080`
And in xampp "httpd-xampp.conf" file i have made below changes to expose PHPmyadmin
`<Directory "C:/xampp/phpMyAdmin">
AllowOverride AuthConfig
Require all granted
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</Directory>`
I am getting this ERROR :
'Illuminate\Database\QueryException: SQLSTATE[HY000] [2006] MySQL server has gone away'
I have configured my DB in laravel like this ".env" file
`
DB_HOST=ip_address_of_another_pc
DB_PORT=3306
DB_DATABASE=mychecklist
DB_USERNAME=user
DB_PASSWORD=pass`
The pcs have 2 different OS 1) windows(Db) and 2) Ubuntu 20.04(try to access db)
how to solve this?
I am using laravel 5.4, and I put all database details in .env file for connecting database, but unfortunately, this details can see my URL path, so what is the best solution for declare database details in Laravel,
thank you
this is the screen short of accessing .env file through URL
You can control it access by htaccess.
<Files .env>
order allow,deny
Deny from all
</Files>
This will prevent the access of .env file from url. Place this into your root htaccess file.
Thank you.
The error mentioned here: http://docs.memsql.com/latest/tshoot/2002/ I was getting using Ubuntu 14.04.2. The MySQL client and the latest MemSQL advised to point the 'my.cnf' config to the 'memsql.sock' file located in '/var/lib/memsql', however there is no such file.
After much searching and troubleshooting, there are similar errors but without the proper file they're irrelevant in as much that without the 'memsql.sock' file there can be no connection. I'm considering using MemSQL in production soon.
There are multiple reasons why you might observe this behavior.
First of all, note that the documentation suggests that the file is under /var/lib/memsql/data, while based on your question you might be looking for it under /var/lib/memsql.
It could also be that your MemSQL is not installed in /var/lib/memsql, but in some other place. In this case the memsql.sock file will be in the data subdirectory of the directory where your MemSQL is installed.
Finally, it could be that your memsql.cnf is missing the socket argument. You need to configure both the client and the server to use the same socket. The documentation page you pointed to suggests to change /etc/mysql/my.cnf -- that's the client config. Your server config is in the memsql.cnf file, which is most likely in /var/lib/memsql/memsql.cnf. Make sure it has the following line:
socket = memsql.sock
Then as you restart MemSQL, it will create the memsql.sock file.
If none of this works, you can also just connect to 127.0.0.1 instead of localhost, in which case the memsql.sock file will not be used.
If you use the mysql client without -h 127.0.0.1 it will try to connect to the socket, which by default is set to /var/run/mysqld/mysqld.sock. This is typically set in /etc/mysqld/my.cnf or wherever your my.conf file is. If you change your $HOME/.my.cnf file to have
[client]
port = 3306
socket = /var/lib/memsql/data/memsql.sock
this should work. Note, this is a behavior of the mysql client not MemSQL.
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.
I am trying to dump a table from MySQL database into a text file by running the following query
SELECT fields FROM text_file_table INTO OUTFILE 'C:\\Program Files\\textfile.text'
But it gives me the error
Cant create/write to file "C:\Program Files\textfile.text"
I think it is due to security issue, that it is not allowing the DBMS to write the file on that directory. If there can be any other issue, please let me know, and also help me finding solution to the problem. And I am doing this on Windows Server 2008. Thanks!
There could be two issues. The command runs in the operating system as 'mysql' so the 'mysql' user may not have permission to write in c:\Program Files. It shouldn't, so that's good. If you change your target path to somewhere that you can write to, this problem will go away.
The other issue is that the user you are logged in as inside mysql may not have the privilege to read and write files - see http://dev.mysql.com/doc/refman/5.1/en/privileges-provided.html#priv_file. If this is the problem, you'll have to GRANT the privilege to your user.
I think problem is with the path . if you are using windows
the filepath sould be like this in the query
'C:/Program Files/textfile.txt'
OR try this , i am not sure
'C:\Program Files\textfile.txt'
also use txt inside of text in the file name => textfile.text