Jump to content

Uploading changed files of my website?


eduard

Recommended Posts

It's not necessary to understand the code at this point, if you're getting an error in phpMyAdmin about not being able to start the session, then this code will enable all error messages and then start a session. The error message you see in phpMyAdmin was not generated by PHP, it was generated by phpMyAdmin. Running the above code will get the error message from PHP, if there is one.
Yes, only ´test´But I won´t be able to log in (neither my files) to log in phpMyAdmin?
Link to comment
Share on other sites

  • Replies 128
  • Created
  • Last Reply
it sounds like the privileges for your host are different than the one's you are using locally. You need to find out how to get access to your hosted database so you can make the user profiles match both locally and on your host. The options are to1) change/add user privileges on the host to match the root user of your local database or2) change/add user privileges on your local machine to match the root user of your hosted databaseeither way requires access to your hosted database. Did you receive anything from your host when you signed up?
This post I don´t understand well! hosted database? You mean the php files? But I don´t understand why they are different, because I uploaded the original ones?
Link to comment
Share on other sites

You shouldn't be uploading your phpMyAdmin files to your server online. You need to use their copy of phpMyAdmin, not one you upload. If you're having problems logging into phpMyAdmin which is hosted on your local computer, not your online server, that's what I'm trying to solve. If you can't log in to phpMyAdmin on your online server then you need to contact your host, you can't fix that problem.

Link to comment
Share on other sites

You shouldn't be uploading your phpMyAdmin files to your server online. You need to use their copy of phpMyAdmin, not one you upload. If you're having problems logging into phpMyAdmin which is hosted on your local computer, not your online server, that's what I'm trying to solve. If you can't log in to phpMyAdmin on your online server then you need to contact your host, you can't fix that problem.
I did contact my host but no reply (also Chilean!).However, I don´t understand why I didn´t receive this reply BEFORE uploading?
Link to comment
Share on other sites

If you're trying to upload your website, I don't know why you would think you would need to upload files for phpMyAdmin. phpMyAdmin is not part of your website.
But to show the results of queries of my database I need it? To get the results I must be logged in? and that I (still) can´t!
Link to comment
Share on other sites

But to show the results of queries of my database I need it? To get the results I must be logged in? and that I (still) can´t!
the whole point we've been trying to make is that you'll have distinct databases, one locally and one on your host sites server. What you have to do is export the local database and then import the changes into the hosted one. There are easier methods for doing this, like creating patches, but that is certainly far and away from you right now.We've mentioned this before, but it is not surprising that you have overlooked this simple fact, but you have to understand that this kind of situation exists. So you need to have access to your host's phpMyAdmin so you can re-create your local database or export your local one into the hosted one.
Link to comment
Share on other sites

But to show the results of queries of my database I need it?
Nope. Your website doesn't use phpMyAdmin. Your server might have it installed for you to manage your databases, but your website doesn't do it. Look at your PHP code and tell me in which part of the code you think you're using phpMyAdmin.
Link to comment
Share on other sites

the whole point we've been trying to make is that you'll have distinct databases, one locally and one on your host sites server. What you have to do is export the local database and then import the changes into the hosted one. There are easier methods for doing this, like creating patches, but that is certainly far and away from you right now.We've mentioned this before, but it is not surprising that you have overlooked this simple fact, but you have to understand that this kind of situation exists. So you need to have access to your host's phpMyAdmin so you can re-create your local database or export your local one into the hosted one.
What do you think I did last night? Ask my host for my password to phpMyAdmin (which they haven´t either!)
Link to comment
Share on other sites

Nope. Your website doesn't use phpMyAdmin. Your server might have it installed for you to manage your databases, but your website doesn't do it. Look at your PHP code and tell me in which part of the code you think you're using phpMyAdmin.
But where go the queries of my INSERT and SELECT php files?
Link to comment
Share on other sites

But where go the queries of my INSERT and SELECT php files?
the DATABASE.(c'mon you need to know this stuff by now.)phpMyAdmin does the same thing SQL commands do, except it gives you a UI.
Link to comment
Share on other sites

the DATABASE.(c'mon you need to know this stuff by now.)phpMyAdmin does the same thing SQL commands do, except it gives you a UI.
But the database is hosted by phpMyAdmin? I´ve created there and it´s interactive! Visitors (=customers) must have an interactive website?
Link to comment
Share on other sites

phpMyAdmin is a "client" to your database, the same way your site or another application can be.

		 -------------		| My Database |		 -------------			 ^   ^			 |   |	   ------	 ------	  |				 | ------------	 ------------| phpMyAdmin |   | My website | ------------	 ------------

phpMyAdmin works with the database.My website works with the database.My website does not work with phpMyAdmin.

Link to comment
Share on other sites

Isn´t then an easy solution to create a database (because now it´s in phpMyAdmin) from your tutorials?

Link to comment
Share on other sites

phpMyAdmin is a "client" to your database, the same way your site or another application can be.
		 -------------		| My Database |		 -------------			 ^   ^			 |   |	   ------	 ------	  |				 | ------------	 ------------| phpMyAdmin |   | My website | ------------	 ------------

phpMyAdmin works with the database.My website works with the database.My website does not work with phpMyAdmin.

Thanks!
Link to comment
Share on other sites

the database isn't in anything. I don't know what's so hard to get. You have a database. To access it, you use 1) a server side language like PHP to write SQL commands to make things happen to it (INSERT/SELECT/etc) via your webpages2) phpMyAdmin (which, for example, when you have it create a table, handles the SQL for you. If you notice, when you do something in phpMyAdmin, it will show you the SQL it executed)3) the command lineThe common insight to gain from all of these is they only do one thing; they execute SQL on your database.

Link to comment
Share on other sites

the database isn't in anything. I don't know what's so hard to get. You have a database. To access it, you use 1) a server side language like PHP to write SQL commands to make things happen to it (INSERT/SELECT/etc) via your webpages2) phpMyAdmin (which, for example, when you have it create a table, handles the SQL for you. If you notice, when you do something in phpMyAdmin, it will show you the SQL it executed)3) the command lineThe common insight to gain from all of these is they only do one thing; they execute SQL on your database.
What I don´t understand-after post 1 of this topic-why you haven´t written me then that the files on my host server must be equal to my files on my local host?I´ve been trying to get the password for my phpMyadmin for 2 days, which wasn´t necessary!
Link to comment
Share on other sites

I can create a database without using phpMyAdmin, because I get an error message now:Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: YES) in /Applications/MAMP/htdocs/website/create.php on line 5Could not connect: Access denied for user 'root'@'localhost' (using password: YES)Do I have to use a totally NEW code?

Link to comment
Share on other sites

Do I have to use a totally NEW code?
No. For the (5th? 6th?) time, you just need to make sure that your username and your password match. Whatever you have for a username and password set up in the database is what you have to use for mysql_connect.
Link to comment
Share on other sites

No. For the (5th? 6th?) time, you just need to make sure that your username and your password match. Whatever you have for a username and password set up in the database is what you have to use for mysql_connect.
MATCH WITH WHAT? I still get a msql-error!
Link to comment
Share on other sites

Here´s that message!Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'eduard'@'localhost' (using password: YES) in /Applications/MAMP/htdocs/website/create.php on line 5Could not connect: Access denied for user 'eduard'@'localhost' (using password: YES)

Link to comment
Share on other sites

Do you actually have a MySQL database installed on your local machine?If you do not have any idea what I mean, create a simple php script such as;

<?php   phpinfo();?>

and save it as phpinfo.php, then open it in your browser. There you can see how your local host is setup. If you don't understand what it displays, post a screenshot.

Link to comment
Share on other sites

:) You're having 1 application* at 2 places.It currently works at 1 place (your computer), correct? On that 1 place, you have 1 DB server** and your application is accessing 1 database from the DB server. Your application works at this 1 place with that 1 DB server with that 1 database.You have the "holy trinity" in that 1 place - "the DB server, the database and the holy application" (amen! :) ).Here's the thing, on that other place, you have another DB server. You need to adjust your application for it to work with that other DB server. And BTW, you also have another (copy of) the database there.If everything was OK, the only thing you'd need to alter in your application is the connection with the DB server. In your case, you'll likely need to alter a few things after that, but we don't want to make you jump ahead, because apparatly you're failing even with the most basic stuff.The username and password in mysql_connect are the first thing you need to change in accordance with the username and password for that other DB server. What username/password combo does that other server require? THAT is what you need to ask your host if you can't find that information yourself.* Application = DB client = MySQL client = PHP = phpMyAdmin** "DB server = MySQL server". I'm using the term "DB server" because it would've been the same story even if you used another kind of database.
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...