w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Not seeing database from localhost but seeing it when connecting to server
GRANT USAGE is not what you want. According to the mysql documentation: USAGE Synonym for “no privileges” It is used at the global level with GRANT to modify account attributes such as resource limits or SSL characteristics without affecting existing account privileges. http://dev.mysql.com/doc/refman/5.1/en/grant.html You need to grant actual privileges to your "someuser" user for the database the user needs to see. For example, if you grant select privileges on the mysql.*: GRANT SELECT ON mysql.* TO someuser@localhost IDENTIFIED BY "somepassword"; FLUSH PRIVILEGES; Now, someuser connected from localhost will be able to see the mysql database when executing SHOW DATABASES; However, you might want to reserve the access to the mysql database for root only.

Categories : Mysql

localhost/phpmyadmin 404 error
Solved with @Jamie Taylor comment: try changing *.conf to apache.conf. Then get 403 response forbidden, and solved it by adding: Order allow,deny Allow from all to <Directory "/usr/share/phpmyadmin"> </Directory> in /etc/phpmyadmin/apache.conf And don't forget to uncomment: $cfg['Servers'][$i]['AllowNoPassword'] = TRUE; in /etc/phpmyadmin/config.inc.conf, if you want to use PHPMyAdmin without password (only localhost, of course).

Categories : Apache

Localhost/phpmyadmin/ returns php code
Your problem is (as suggested in the comments) Apache has no idea "how" to run php, so it is just giving you the raw php files. You need to install PHP if you haven't, otherwise, if you have installed php you need to configure apache to use it. If PHP is NOT installed Go ahead and google it, there are a ton of resources out there explaining how to do it. A good thing to look for is the WAMP stack. Which stands for Windows, Apache, MySQL & PHP. There are many places showing you how to install each of these individual components. If PHP is installed The httpd.conf file needs to be modified to include PHP. Add the following line after all of the LoadModule statements: LoadModule php5_module "[PathToPHP]/php5apache2_2.dll" Search for AddType, and add the following after the l

Categories : PHP

localhost/phpmyadmin/ open as https and not as http
you can take look on below 2 document link to solve your issue just go throw this link you can sure solve your issue http://www.michaelbarton.name/2009/12/13/forcing-ssl-with-phpmyadmin/ // place this at the bottom somewhere $cfg['ForceSSL'] = false; And also please check below http://docs.phpmyadmin.net/en/latest/config.html

Categories : PHP

localhost/phpmyadmin giving page not found error
Solved as per the steps on this page: http://www.sitepoint.com/forums/showthread.php?618686-Virtual-hosts-and-phpmyadmin

Categories : Mysql

cURL connecting to the localhost when given a bad URL
Thanks to Brad for pointing me in the right direction to find this: Our test server had both a wildcard *.nitrc.org defined in DNS and also a "search nitrc.org" directive in resolve.conf. Therefore, every domain that wasn't valid would be prepended to nitrc.org and would then match our wildcard dns.

Categories : PHP

Amazon AWS server with database on localhost, how do I ssh so that my php webservices on localhost can run on it?
It sounds like you are trying to connect to your remote database from your local server (if I understand correctly). You want to double check your security groups in AWS that they are allowing your computers ip address to connect to the server instance / that port 3306 is open to your pc. If that is all set, then you should be able to connect to the instance using the public dns or elastic ip if it is an EC2 instance, or the endpoint if it is an RDS instance.

Categories : PHP

Issue connecting to postgresql using pdo on localhost (08006)
See http://www.postgresql.org/docs/9.1/static/auth-methods.html: The ident authentication method works by obtaining the client's operating system user name from an ident server and using it as the allowed database user name (with an optional user name mapping) The ident authentication method is not really suited for connections from a web server, because the web processes run under a account, typically www-data or some such that has no relationship with the databases account (rockprofile in your case). Since you want authentication by password, replace this with md5 in pg_hba.conf and reload or restart PostgreSQL. Also you may change your password because it appears in clear in the trace, negating your substitution effort in the code.

Categories : PHP

connecting to mac localhost via windows computer sharing the same network
Providing that you edited the hosts file in Windowssystem32driversetchosts, it should normally work most of the time. If it doesn't, the only thing I can think off is that it it sometimes necessary to reset and clear the cache in Windows 7. You can have a look at Windows 7 refresh DNS for guidance. There is a step by step post here.

Categories : Apache

connecting to mysql from localhost when data is on server (cpanel)
try using port number with the domain in mysql_connect(); . The default mysql port number is 3306. mysql_connect('yourdomain.com:3306', 'user', 'password');

Categories : Mysql

How to copy columns from Database A to Database B in phpMyAdmin
Try this INSERT INTO DestinationDB.DestinationTable ( ID, Name) (SELECT id, name FROM SourceTable.SourceTable) Note: Two Dots(..) can't be used here. single Dot is enough for Map the Database. Use DestinationDB.DestinationTable

Categories : SQL

many to many database phpmyadmin
A many to many relationship in a normal relational database, like MySQL, is normally constructed using a cross link table. That is a table that links to records in the other tables together. For instance, when you've got tables A and B, you create a third table, C, which can look (very simplified) like this: A B C == == ==== A1 B1 A1B3 A2 B2 A2B1 A3 B3 A2B2 A3B2 So in this cross link table, you can see that record A2 is linked to two records in B, just as B2 is linked to two records in A. Of course, this schema is simplified. A1 is actually the keyfield of table A and A1B1 is a primary key that consists of two fields, one having a foreign key constraint to the key of table A and one having an FK to table B. It d

Categories : SQL

Django - Unit Tests on localhost creating objects in main database, but not finding them in the test database later in the method
You should use LiveServerTestCase, so that django can run it's own test server and therefore use it's own test db. https://docs.djangoproject.com/en/1.4/topics/testing/#live-test-server

Categories : Python

Rake task to import sql database on localhost database
This isn't a Rake or Ruby on Rails error. Have you tried running that command on the command line? The problem is that you're trying to import a MYSQL or PostgreSQL dump into SQLite. I don't think SQLite understands AUTO_INCREMENT - I believe it should be AUTOINCREMENT (SQLite AutoInc) Try changing your DB to PostgreSQL or modify the dump to be SQLite compatible.

Categories : Ruby On Rails

phpMyAdmin can't export database
It says at the bottom PHP Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 491520 bytes) in /usr/share/phpmyadmin/libraries/tcpdf/tcpdf.php on line 22694, Either your VPS is out of memory or your PHP settings are not allowing more than 16MB of memory to be allocated. Increase the memory in php.ini or just use mysqldump php.ini change memory_limit = 64M I strongly recomend using mysqldump though here is an extract from my backup script #!/bin/bash time=`date +%Y-%m-%d_%H-%M-%S` mysqldump -u mysqluser -pmysqlpassword --all-databases | 7za a -si database/backup-${time}.sql.7z -p7zpass That saves the backup in a 7zip file protected by the password 7zpass

Categories : PHP

Can't access database through phpMyAdmin
If you just need access to your database and you know your login credentials, try using adminer: http://www.adminer.org/ It's just a single PHP file that you drop in to your web server, and doesn't have the history of security holes that phpMyAdmin does. We've replaced all our phpMyAdmin installs with adminer on both MySQL and Postgres and it works great.

Categories : Mysql

Access Database Without phpMyAdmin
In order to download the database script you don't need know where's phpmyadmin. If you know: username, password, hostname, and databasename, then you need just exec this from a terminal: mysqldump -u username -h hostname -p --single-transaction databasename > sqldb.sql And you'll got it into sqldb.sql script

Categories : Mysql

phpMyAdmin has two database tables under one heading
To ascertain which is the correct database, create a new user via the Joomla interface, then have a look at the users Joomla table via phpMyAdmin, in both databases, to see in which database the user got created.

Categories : Joomla

How can I import an sqlite database to phpMyAdmin?
You might want to take a look at phpliteAdmin. It looks like this: You only need to be able to execute PHP. The whole project consists of 3 files, where one is a README, one is a config file and the other one is the real program.

Categories : Sqlite

how to get values from database phpmyadmin and show
Well firstly, insert a: return false; at the end of your insertData() function, in that way you prevent the refresh of the page so that the ajax call can load its data. Second you are returning Success and you are trying to read success, it's case sensitive and your code will not reach that if. Resolve these issues and get back to me

Categories : PHP

Restructured database, using SQL in phpmyadmin to move data around
If I understand correctly you want to copy related records from your old table to the new tables, in which case you can use something like this UPDATE units u INNER JOIN records r ON u.id=r.id SET u.unit = r.unit This will copy the unit type from your old table to the matching id in the new units table and then you can do something similare on your 3rd table

Categories : PHP

phpmyadmin limit privileges for a specific database
I don't think there is a way to grant a MySQL user priviliges in the form of 'all except one'. However you could use a MySQL query to generate a list of GRANT-queries like this: SELECT CONCAT('GRANT ALL ON ',SCHEMA_NAME,' TO user_name') FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME!='exclude_database' and then execute those for every user.

Categories : Mysql

phpmyadmin md5 decryption issue after importing database
md5 is not encryption, it's a one-way hash. You cannot find the original value from a hash. On the second server, if the e10adc3949ba59abbe56e057f20f883e password works, the only reason I see, is that the application is not comparing the hash of the input value it received from the user, it's comparing the input value itself.

Categories : Database

Access denied error when trying to create database using phpMyAdmin
You can grant usage by using grant usage on *.* to prasad@localhost identified by 'passwd'; Another thing regarding access denied to even localhost is caused when your firewall is active. You can try disabling antivirus software and also firewall. A suggestion will be if you are using mysql, then mysql workbench is a great to have. You can create databases through GUI quite easily

Categories : Mysql

mysql phpmyadmin User Input COMPARE database
I would use a different approach and do the search in your SQL-query. SQL is better (and performs better) on that kind of searches. You won't need a while loop for this query: SELECT * FROM users WHERE username = '<input username here>' OR email = '<input email here>' If you get a result, it means that either the username or the e-mailaddress is already registered. Use an if-statement to check whether or not it's the username or the e-mailaddress. Please, don't use mysql_* functions in new code. They are no longer maintained and are officially deprecated. See the red box? Learn about prepared statements instead, and use PDO or MySQLi - this article will help you decide which. If you choose PDO, here is a good tutorial. EDIT: The full PHP-code would be something like

Categories : PHP

Get data from phpMyAdmin database from bluehost hosted website
bluehost has a remote database section in the cpanel, You can add whatever IP address you need to access that database and use a remote mysql connection. If your ip address will change you can add a class C range, otherwise you may need a different database hosting provider that allows for wildcard ip addresses to connect.

Categories : Mysql

Is there any way to find who is deleted database from Phpmyadmin which is hosted on linux server
I guess you just have to check your log file. Here how to log all queries in mysql Log all queries in mysql

Categories : Mysql

mysql database edited in phpmyadmin does not return query in php script
You need to set which button was selected by the user, use result as parameter in query Assuming radio buttons set up as <Input type = 'radio' Name ='active' value= 'active'>Active <Input type = 'radio' Name ='active' value= 'dormant'>Dormant // get value of radio button for $active $active = $_POST['active']; } ETC.............. Assign parameters $stmt->bindValue(':active', $active, PDO::PARAM_STR);

Categories : PHP

How to remove "CREATE DATABASE IF NOT EXISTS" statement from Export in phpMyAdmin 4?
This behavior did not happen by default in version 3. A quick fix, actually a hack and thus not the desirable solution, is to edit the export class file located in libraries/plugins/export/ExportSql.class.php and force the CREATE and USE statements to be commented out by adding "-- " before them, as such: Line 709 $create_query = '-- CREATE DATABASE IF NOT EXISTS ' Line 734 '-- USE ' . PMA_Util::backquoteCompat($db, $compat) Edit: There's a drawback, and that is if you export one or more entire databases (not just some or all the tables inside a database), then the CREATE and USE statements appear commented also.

Categories : Mysql

what does "Connecting to database specified by database.yml" in the log file mean?
Check this answer. This may help you. Rails Connecting to database specified by database.yml

Categories : Database

Error in connecting aspx.cs to database situated in app_data folder [database connection error]
Have you tried localhost as opposed to (LocalDBv11.0), like this? objconn.ConnectionString = "Data Source=localhost;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|test.mdf;User Instance=true;user id=xyz; password=xyz123; Initial Catalog=TEST"; localhost will use TCP, while (LocalDBv11.0) will use Named Pipes

Categories : C#

JSP - connecting to a database
Your intuition is right. You should not connect from the JSP directly to the database, if that is even possible. Most programs consist of several layers. For example: You have the DAO (Data Access Object) which has one responsibility: getting data from the database. It does not care what happens with that data, but it retrieves it. Then you have the service layer which does business logic, calculations, etc. It does not care where the data comes from, it just assumes the data is there (but it is from the dao) Then you have the user interface layer which prepares the information to be used in JSP's, does transformations that the JSP cannot do, filter out information that is not required, etc. And once again, it does not know anything about where the data comes from, it just gets it from

Categories : Java

PHP: Not connecting to database
You need to add "" around the fields you are about to insert. You presently have: $query="INSERT INTO user (fname, lname, username, password)"."VALUES('$fname', '$lname', '$username', '$password_hash')"; Do this instead: $query='INSERT INTO user (fname, lname, username, password) '. 'VALUES("'.$fname.'", "'.$lname.'", "'.$username.'", "'.$password_hash.'")';

Categories : PHP

Connecting to a database in C#
You have an SDF file, meaning that you connect to a Sql Compact not to Sql Server. You need to use the classes in the namespace System.Data.SqlServerCe SqlCeConnection conn = new SqlCeConnection(source); Also, I am not sure of this, but I think you don't need to have single quotes around values in the connection string string source = "Data Source=E:\Documents\Database\MyDatabase.sdf;" + "Password=password;" + "Persist Security Info=False;";

Categories : C#

c#: Connecting to php Mysql database
Try this //create a MySQL connection with a query string MySqlConnection connection = new MySqlConnection("server=localhost;database=cs;uid=root;password=abcdaaa"); //open the connection connection.Open(); //close the connection connection.Close();

Categories : C#

Connecting to database in Express
You're missing the mysql module. var express = require('express') , http = require('http') , mysql = require('mysql'); But also you need to connect(): connection.connect(); Before you start querying the database. All-together now for laziness: var express = require('express') , http = require('http') , mysql = require('mysql'); // <---- HERE var app = express(); var connection = mysql.createConnection({ host: 'localhost', user: 'root', password: "root", database: 'restaurant' }); connection.connect(); // <---- AND HERE // all environments app.set('port', process.env.PORT || 7002); app.get('/',function(request,response){ connection.query('SELECT * FROM restaurants', function(err, rows, fields) { console.log('Connection result erro

Categories : Node Js

connecting to a database in mysql using php
You're using the old mysql library which is a no no Get comfy with the Mysqli Extension for all your database access needs. I'll even refactor this a bit for you. $conn = new Mysqli('localhost', 'demo', 'abc', 'practice'); $sql = "SELECT*FROM contact"; $results = $conn->query($sql); while($row = $results->fetch_assoc()) { var_dump($row); } edit: JimiDini posted a link that you should definitely read. http://phptherightway.com/

Categories : PHP

connecting to an SQL Server database
The problem your having with regards to connecting to the database on a server is because of SqlConnection dbConnection = new SqlConnection("Data Source=.\SQLEXPRESS;Integrated Security=true"); The best way to do this is to go to your Web.config file and find the block and add a connection to your database in there. eg <add name="ConnectionString" connectionString="Data Source=YOUR SERVER;Initial Catalog=YOUR DATABASE;User ID=YOUR USER ID;Password=YOUR PASSWORD" /> then you can just call the connection string accross your whole project whenever you need to use it. Also with regards to VS2012. There are very few companies using that IDE at the moment so your probably better off learning VS 2010 in the most part but i would agree that VS2008 is fairly out of date now

Categories : C#

Connecting to a MS Access database
Try this, assuming you have the PDO odbc driver installed and enabled on the web server. $user='Admin'; $password=''; $mdbFilename="Custos_TAB.accdb"; $connection = odbc_connect("Driver={Microsoft Access Driver (*.mdb, *.accdb)};Dbq=$mdbFilename", $user, $password); $sql="SELECT * FROM [tblHere]"; $rs=odbc_exec($connection,$sql); //do stuff here odbc_close($connection); or $user='Admin'; $password=''; /*if you have a path here such as c:dbCustos_TAB.accdb, make sure to use double backslashes, (i.e "c:\db\Custos_TAB.accdb")*/ $mdbFilename="Custos_TAB.accdb"; $conn = new PDO("odbc:Driver={Microsoft Access Driver (*.mdb, *.accdb)};Dbq=$mdbFilename;Uid=$user='Admin';Pwd=$password;"); $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTI

Categories : PHP

Connecting to mysql database with go
connection refused generally means the port isn't open or is being blocked by a firewall. A couple things to check: Is MySQL (on localhost) running? Is it on port 3306? If you're on Windows, Mac or Linux, is there a firewall that might be blocking port 3306? If you're on Linux, is SELinux enabled that might be blocking port 3306?

Categories : Mysql



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.