473,396 Members | 1,966 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

SQL from webpage:

Hi,

Let's say that I can't log on to the MySQL daemon on the server; Is it
then possible to use the dump-file from mysqldump in a PHP-query so it
can be executed/processed on the localhost? I've tried just pasting the
SQL into a simple query, but it doesn't seem to work. And I can't find
much info about it anywhere. It all requires me to log on or create a
connection from outside localhost ... and I can't.

Thanks,

--
Daniel Henriksen
ds*@vip.cybercity.dk

Soccer Games Homepage:
http://sgh.soccergaming.com

Jul 19 '05 #1
12 2572
Daniel wrote:
Hi,

Let's say that I can't log on to the MySQL daemon on the server; Is it
then possible to use the dump-file from mysqldump in a PHP-query so it
can be executed/processed on the localhost? I've tried just pasting the
SQL into a simple query, but it doesn't seem to work. And I can't find
much info about it anywhere. It all requires me to log on or create a
connection from outside localhost ... and I can't.


You can log into mysql from outside the localhost, if you want to. Would
this be a better solution or is there some reason for not doing this?

Jul 19 '05 #2
Daniel wrote:
Hi,

Let's say that I can't log on to the MySQL daemon on the server; Is it
then possible to use the dump-file from mysqldump in a PHP-query so it
can be executed/processed on the localhost? I've tried just pasting the
SQL into a simple query, but it doesn't seem to work. And I can't find
much info about it anywhere. It all requires me to log on or create a
connection from outside localhost ... and I can't.


You can log into mysql from outside the localhost, if you want to. Would
this be a better solution or is there some reason for not doing this?

Jul 19 '05 #3
Daniel wrote:
Hi,

Let's say that I can't log on to the MySQL daemon on the server; Is it
then possible to use the dump-file from mysqldump in a PHP-query so it
can be executed/processed on the localhost? I've tried just pasting the
SQL into a simple query, but it doesn't seem to work. And I can't find
much info about it anywhere. It all requires me to log on or create a
connection from outside localhost ... and I can't.


You can log into mysql from outside the localhost, if you want to. Would
this be a better solution or is there some reason for not doing this?

Jul 19 '05 #4
Aggro wrote:
You can log into mysql from outside the localhost, if you want to. Would
this be a better solution or is there some reason for not doing this?


I know I can and wish I could, but there is obviously a problem allowing
my hostname, so I cannot log on mySQL and access the database. Alas this
may seem to take a while to fix and (having spent some time programming
a new site in PHP) I would very much like to have my site up and running
=) That's why I ask. Hmm, but it doubt I can ... =(

Thanks for your time,

--
Daniel Henriksen
ds*@vip.cybercity.dk

Soccer Games Homepage:
http://sgh.soccergaming.com

Jul 19 '05 #5
Aggro wrote:
You can log into mysql from outside the localhost, if you want to. Would
this be a better solution or is there some reason for not doing this?


I know I can and wish I could, but there is obviously a problem allowing
my hostname, so I cannot log on mySQL and access the database. Alas this
may seem to take a while to fix and (having spent some time programming
a new site in PHP) I would very much like to have my site up and running
=) That's why I ask. Hmm, but it doubt I can ... =(

Thanks for your time,

--
Daniel Henriksen
ds*@vip.cybercity.dk

Soccer Games Homepage:
http://sgh.soccergaming.com

Jul 19 '05 #6
Aggro wrote:
You can log into mysql from outside the localhost, if you want to. Would
this be a better solution or is there some reason for not doing this?


I know I can and wish I could, but there is obviously a problem allowing
my hostname, so I cannot log on mySQL and access the database. Alas this
may seem to take a while to fix and (having spent some time programming
a new site in PHP) I would very much like to have my site up and running
=) That's why I ask. Hmm, but it doubt I can ... =(

Thanks for your time,

--
Daniel Henriksen
ds*@vip.cybercity.dk

Soccer Games Homepage:
http://sgh.soccergaming.com

Jul 19 '05 #7
Daniel wrote:
I know I can and wish I could, but there is obviously a problem allowing
my hostname, so I cannot log on mySQL and access the database. Alas this
may seem to take a while to fix and (having spent some time programming
a new site in PHP) I would very much like to have my site up and running
=) That's why I ask. Hmm, but it doubt I can ... =(


I'm not sure what you are talking about..

Are you able to log in to mysql as root? (From localhost that is)
Do you know about the "grant" syntax? For example...

-----------
This will allow "user" to connect to "database" only from localhost:

GRANT ALL ON database.* TO user@localhost IDENTIFIED BY "password"

-----------
This will do the same, except this allows connection only from example.com:

GRANT ALL ON database.* TO us**@example.com IDENTIFIED BY "password"

-----------
And this allows connection from any address starting with 192.168.0.

GRANT ALL ON database.* TO user@'192.168.0.%' IDENTIFIED BY "password"

-----------
I hope this helps, but I'm still unsure about what the problem is, sorry.

Jul 19 '05 #8
Daniel wrote:
I know I can and wish I could, but there is obviously a problem allowing
my hostname, so I cannot log on mySQL and access the database. Alas this
may seem to take a while to fix and (having spent some time programming
a new site in PHP) I would very much like to have my site up and running
=) That's why I ask. Hmm, but it doubt I can ... =(


I'm not sure what you are talking about..

Are you able to log in to mysql as root? (From localhost that is)
Do you know about the "grant" syntax? For example...

-----------
This will allow "user" to connect to "database" only from localhost:

GRANT ALL ON database.* TO user@localhost IDENTIFIED BY "password"

-----------
This will do the same, except this allows connection only from example.com:

GRANT ALL ON database.* TO us**@example.com IDENTIFIED BY "password"

-----------
And this allows connection from any address starting with 192.168.0.

GRANT ALL ON database.* TO user@'192.168.0.%' IDENTIFIED BY "password"

-----------
I hope this helps, but I'm still unsure about what the problem is, sorry.

Jul 19 '05 #9
Daniel wrote:
I know I can and wish I could, but there is obviously a problem allowing
my hostname, so I cannot log on mySQL and access the database. Alas this
may seem to take a while to fix and (having spent some time programming
a new site in PHP) I would very much like to have my site up and running
=) That's why I ask. Hmm, but it doubt I can ... =(


I'm not sure what you are talking about..

Are you able to log in to mysql as root? (From localhost that is)
Do you know about the "grant" syntax? For example...

-----------
This will allow "user" to connect to "database" only from localhost:

GRANT ALL ON database.* TO user@localhost IDENTIFIED BY "password"

-----------
This will do the same, except this allows connection only from example.com:

GRANT ALL ON database.* TO us**@example.com IDENTIFIED BY "password"

-----------
And this allows connection from any address starting with 192.168.0.

GRANT ALL ON database.* TO user@'192.168.0.%' IDENTIFIED BY "password"

-----------
I hope this helps, but I'm still unsure about what the problem is, sorry.

Jul 19 '05 #10
Daniel wrote:
I'm not able to log in at all. Please bear in mind that I'm not the
server-admin and the only thing I can run on localhost is the PHP-pages
and that's why I was asking if I can use the sql from mysqldump in a
query on one of these PHP-pages ... I'm not able to log in on mySQL (if
I could I could as well use mysqldump to recreate the tables) and I
cannot use any mySQL commands.


Ok now I understand. But I'm not yet sure how or what you are doing with
php. I'm pretty sure you can create tables etc. if you have rights to do
so. I don't know if php have it's own system to do this, so you need to
check

http://www.php.net/

website, or ask from some php related newsgroups. I bulieve the website
has a very good documentation about these things.
Jul 19 '05 #11
Daniel wrote:
I'm not able to log in at all. Please bear in mind that I'm not the
server-admin and the only thing I can run on localhost is the PHP-pages
and that's why I was asking if I can use the sql from mysqldump in a
query on one of these PHP-pages ... I'm not able to log in on mySQL (if
I could I could as well use mysqldump to recreate the tables) and I
cannot use any mySQL commands.


Ok now I understand. But I'm not yet sure how or what you are doing with
php. I'm pretty sure you can create tables etc. if you have rights to do
so. I don't know if php have it's own system to do this, so you need to
check

http://www.php.net/

website, or ask from some php related newsgroups. I bulieve the website
has a very good documentation about these things.
Jul 19 '05 #12
Daniel wrote:
I'm not able to log in at all. Please bear in mind that I'm not the
server-admin and the only thing I can run on localhost is the PHP-pages
and that's why I was asking if I can use the sql from mysqldump in a
query on one of these PHP-pages ... I'm not able to log in on mySQL (if
I could I could as well use mysqldump to recreate the tables) and I
cannot use any mySQL commands.


Ok now I understand. But I'm not yet sure how or what you are doing with
php. I'm pretty sure you can create tables etc. if you have rights to do
so. I don't know if php have it's own system to do this, so you need to
check

http://www.php.net/

website, or ask from some php related newsgroups. I bulieve the website
has a very good documentation about these things.
Jul 19 '05 #13

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Pete..... | last post by:
Hi all. I have made a webpage where there is a webform where people can fill in their personel information: The code is below: I want to transfer the data to a postgreSQL database ( I have...
12
by: David Walker | last post by:
Hi I have a program which I need to interface with a webpage - the webpage will accept an input (probably a 'post' string from the program) and then will process it and needs to return a value. ...
22
by: Ruslan Kogan | last post by:
Hi, I have a webpage with a table that has 4 cells (2x2). In one of those cells, I wish to load a webpage stored on a different server (say...www.webpage.com/abc.htm). Does HTML allow for this...
1
by: teknowbabble | last post by:
I would like to know how to convert HTML code that users input into a TEXTAREA box on a HTML FORM into a separate WEBPAGE. I have something like the diagram below on my webpage. The user is...
5
by: sifar | last post by:
Hi, This is my first post to this Group. A] I am trying to create a escalation page which will mail an escalation report of a faulty product. Items needed on Page: -----------------------
3
by: Ole Hanson | last post by:
Hi I am trying to pass a credentials object to a webpage programmatically. I have a winApp (C#) that I want to be able to open a webpage (by starting IE), but the credentials required by IIS...
3
by: GraVity via DotNetMonster.com | last post by:
Hello all I am new to asp.net or web programming I have a requirement, I have to submit a document to another server using my webpage, there is a perticular protocol for doing that. This protocol...
14
by: jim | last post by:
OK...Don't ask why - it'll just make ya mad. It makes me mad just thinking about it. I swear....if I didn't need this job, I'd tell 'em where to embed their webbrowser control. But, since I do...
14
by: =?Utf-8?B?UGF1bA==?= | last post by:
Hi I tried a google search but could not find anything. I am trying to cause one webpage to reload when a second web page is closed. The second webpage loads data into a session variable and when...
0
by: levi2713 | last post by:
We have IP cameras that we can view by putting the IP address in a web browser. This is a control panel type webpage, but I can go a step further and go to http://<ip address>/capture.html and it...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.