Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    MYSQL




Connect To My Db From Any Site


Can I connect to my db (via php scripts, etc) FROM a client's website ??




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Connect My Site
Im trying to connect my webpages to the MySql database that i have as part of my hosting account, ive dropped a MySqldump file into the database and have been trying to connect my site to the database but im somewhat confused about how to do this, i understand ive got to use a little bit of code to make the connection but where do i place that code? and do i place it on every webpage, im trying to put together GET variables so that when someone clicks the "Buy"
link it should then make the billing popup appear, but mainly at the moment my main confusion is about actually what to insert and where, in order to make the connection between my pages and the database

Site Down
Need help figuring out ohow to unlock tables.
Everytime I try a repair with my Web Host Manager my whole site freezes up.
I have one table that is "in use" a sessions table.
I can use putty and get to the
>Mysql prompt but I am lost from there...
Is there a way to repair or fix this? I have tried using phpmyadmin and cpanel and neither work, they just time out....
what command should I use?

Huge Site
I wonder if MySQL should work with tables having milions of rows, e.g. you have image uploading site and you store daily around thousands of photos and regularly querying them. What are the techniques of this? Is it possible to do this with mysql? Do you know some books, articles about this? I thought about indexing or caching(of course if possible) and I want to learn something about this.

Web Site Form
I want to have a form on my website, almost like a feedback form but not for feedback. It will be for getting info from customers. It will simply be about 30 fields that will need to post to a database. How hard is this with mysql? How would I do this on the web page? Is there a certain language I would need to use? Also is it possible to get an email everytime a record is added via the web form?

Search From Web Site
I have a simple search function. Just an input field and a submit button that should search a table in mysql.

I do some regexp stuff in mysql so i use the REGEXP syntax but you don't have to bother about that, since we'll just asume that the user have input "x y z" in the search field.

Problem 1
I have three fields in a mysql table that i want to search. The simplest way I came up with to do this was:

SELECT * FROM table WHERE CONCAT_WS(' ',field1,field2,field3) REGEXP 'x y z'

But this won't work if field1 = z, field 2 = y and field3 = x .
How can I achive this? It's quite impossible to ad an OR statement for every possible combination of x, y and z. (perhaps I will need to search more fields in a go in the future)... Can I change the regexp to be able to match words in any combination?

Problem 2
How do I set up an index in mysql for the kind of search mentioned above? Is it usable to have an index on field1, field2, field3 if you're going to do a concatenation on them anyway?

Search My Site
All my documents and archives are in mysql database.
How do i setup that i can search my website?

MySQL On A Web Site
I am working on a web page that is currently using a MySQL database to manage our product inventory on our web site.The problem is that I am not the person who developed the web page, but it is now my responsibility. I am going to continue using the existing database, but the management process of a MySQL database on a web server is a new process for me.I am going to assume that I should be using the phpMyAdmin tools to interface with the database, but the php programming is new to me, as well.

I'm a fast learner, so what I'm really looking for is a bit of direction in how I can improve or reconfigure the output for the end-user.Anyway, I don't know if I have provided enough information, but if any of you guys can point or steer me in the direction that would make me an educated contributor to these forums, I would appreciate the introductory patience.

Multilingual Site
like...should i just have a base price and calculate the rest when needed?

i use php, mysql and mod_rewrite

Remote Site.
i jus completed my first database site and ready to upload. but need to know 2 things.
1. where exactly is the database? ive got my site in the inetpub.. is the database in here C:Program FilesMySQLMySQL Server 4.1 ?
2. how do i upload it along with the site? is there just 1 file to upload or is there lots... ?

Building A 1 Page Site?
I have a couple of review site and I'm thinking of building a new one, but along the lines of a 1 page (well, maybe 2 or 3) site. I think the database is pretty basic and the queries dead simple (okay, except for the "I'm thinking about")*, but I'm concerned about 2 things.

1 - site simplicity and fast page loads
2 - some duplicate content

The reviews will have 2 separate text fields.

One will be a description written by me .. unique text.

Another will be a review = customer comments supplied by an affiliate .. duplicate content.

Each text field (description and review) will be up to 10k in size. The database records will also have fields for : name, image link, affiliate link, and a few more .. very brief. Probably a total of 10 fields.

What Im wondering:

1 - what problems should I watch out for, if any, by adding this much text. *I'm thinking about making the first query show up to 10 or 20 items with just maybe the first 30 or 40 words of each text field plus a thumbnail; and then a link in each that would produce a single page with the full text and larger image.

2 - I'm a little concerned that I may get a duplicate content penalty. Will having it in a database help? I'm pretty sure I could put the 'echo' in an iframe and the iframe in a directory and exclude SE bots from that directory with robots.text .. does that make sense?

Finally, there are hundreds of items so I plan on breaking them into categories to keep the menus a reasonable length .. and using javascript to to show an *items* menu when the *category* menu is selected. So should I go ahead and use AJAX to query the database?

Compute Time On Site
I have moderators and i need to compute their time spend on site. I have table moderators_actions(mod_id,action_date). I make up to count sum periods of time between moderate_actions, but only them which are shorter than 5 minutes(if it is longer than 5 minutes I assume the moderator made a break in his work).

My queries:

1. The query finds for each moderators_action next action of this moderator, and time between the action. Choose only shorter than 5 miunutes.

One Database For Site And Forum?
I have a site and a forum and I want to use one database for them, so when somebody registers in the site - to be registered automatically in the forum.
Is this possible and if it is - how?

SIte Search Engine
I am currently working on a site which visitors can submit & search links to various resources. I am trying to set up an advanced search feature (similar to google) and I have several ENUM Fields within the table that I want visitors to be able to check or uncheck within the search.

I also have a username table and would like to be able to measure the popularity of a link so that I can have rankings for different types of resources and count the numbr of times a user submits a link, which user submits which link, number of times a user clicks on a link etc. I am v. new to database design and am not sure whether the ENUM fields should be in a seperate table or whether to keep it as it is: Code:

AIX 5.1 Binary From UCLA Site?
I wonder if anyone would share your experience with the binary download from the UCLA library? I am thinking of an AIX 5.1 box (32 bit) first. If things go well, and if manager allows, I'd like to try another box (AIX 5.1, 64 bit). It'd be nice to hear a success story before taking the jump.

Also, is UCLA's binary the same as the one at mysql.com site? If different, in what way? Is one of them 64bit and the other 3 2bit? Or are they both 32 or 64 bit?

Porting A MySQL Site
I am creating a site here on my local machine, mainly to learn Mysql and php. I am using Mysql 4.1.10, php4, apache 2.0 and windows xp home. After I get an appplication built and running well, what am I going to have to do to make it run on the internet?
Will I simply have to change all occurances of 'locahost' to 'mydomain.com' ?

Cms Site Lo My Local Server
i'm having problem running my cms in my local server, i've downloaded our company sms from our remote webhosting server and tried running it in my local server but a lot of errors popped-up? like:
in index: Notice: Undefined index: pagsanjan_cookie in C:Program FilesApache GroupApache2htdocspagsanjanindex.php on line 568

and what's worst is as i logged in try to modify contents through its php cms alot of errors would pop up like: Notice: Undefined index: fcategory in C:Program FilesApache GroupApache2htdocspagsanjanDynamiclist.php on line 65

Notice: Undefined variable: sqlstring_temp in C:Program FilesApache GroupApache2htdocspagsanjanDynamiclist.php on line 118

Building My First Database Driven Site.
Before I begin, can I just state I have never installed anything on Linux server, so I am very new to this...

Okay at the mo I have and using MYSQL version 3.23.58 on my Linux Sever, incase this is important, heres the details of my server: WEB SERVEUR
Platform : Small - Fedora Core 3
Control panel : Plesk 100
Config : AMEN 2400 - AMD Athlon XP 2400+ Disk: 80 Gb - Memory: 512 Mb

OK, I need to upgrade to the latest MYSQL version. So far, I have downloaded "mysql-standard-5.0.24a-linux-i686.tar" and unpacked the file uner /usr/local

This is where I am stuck, I have no idea what to do next.. I need help for someone never done this before, preferbally a guide like... STEP by STEP, type this,

Linking Site To MySql Database
I have bought the PHP and Database book and have created a database [windows](saved under the default directory under Program FilesMySql...) and I have created a server. How do I link the website (localhost - same PC as one with MySQL) with the database or is it done automatically?

Transfer A Data Base To My Site
i've create a data base with phpmyadmin in my computer and now I want to put it in my site...it's possible to do it? And how?

Create Php Site From Existing Database
I have been contacted by one of my clients to construct a knowledge bank based on their ms access database. I have successfully converted the ms access database to MySQL using the GUI conversion tools supplied by MySQL.com . I am wondering, and I don't know whether this is the right site to do this, if I can easily create a php site based on the database tables that have been converted.

Capitilised Words (values Within Site)
I have have changed servers for my website and when I reuploaded my database backup some text within my site is capitalised. The text that is in highercase seems to be values for example the words I have noticed are SOME, TO, FROM etc it seems to be the same words.

here is another example: "This is Kidderminster's 4th annual Rock Festival, this YEAR taking place ON 28th September 2007, FROM 6:30pm until Midnight AT Kidderminster Town Hall IN the West Midlands."

Has anyone ever come across anything like this before? If I hav backed up wrong or imported wrong please could you provide steps with the DBtools program.

Db On Live Site And Replica On Development PC
I have a Db on my live site, I use DW to manage the site and phpMyAdmin to
manage the mySQL Db, and I'd like to do the following:

1. Replicate the Db on my Dev PC, to modify then reset the live version on
the site to match it.

2. Set phpMyAdmin config to look at the PC version of the Db when developing
and the Live version when its up on the site.

Hope these make some sort of sense - just new to the world of php and mySQL
(actually an MS developer).

MySql 5 On Hoster's Remote Site
I set up an application using Flex, C# web services and MySql 5. On localhost the app works fine. No problems.

However, when I uploaded the site to our hosters, C# can't find MySql db. I followed all the same directory structures layout as on the original.

Using MySql Maestro as my tool I can connect to the remote MySql db.

Database Design For Ecommerce Site
I am looking to design an ecommerce site with categorised products.
Once built, I want my client to be able to add additional categories and be abel to add their products into their chosen category.Would I be best displaying this dynamnically after creating a table with the products category names in it or doing it static?
Also, if I wanted to show a different header / meta tags for weach category how would I best tie this in?

Dating Site Zip Code Distance Question
I'm doing a few tests with a table of 10,000 bogus users and i'm comparing their zip codes against the the user searching and figuring out the distance using the formula you can find in these forums. Problem is that it is slow...especially when I'm joining other tables to the query.

Is there a better way of doing this? Maybe I should just search using the Metro area instead of the zip code. That would make quicker I think since there are far fewer metro areas than zip code entries.

How Do I Change The Date Of A Post On My Forum Site?
Hi, I have started a forum site with a couple of friends. The forum runs on xoops using php 4 with a mysql (4) database. I accidently deleted a few posts. No problem there because I had a copy of the text and posted it again. But the problem is the date and time - obviously it shows the date of the new post and not the date of the deleted one. As I am a newbie still experimenting with mysql and php, I'd sure appreciate your help.

Summary:
=======
I need to change the date of a post in the mysql database. I access the database using phpmyadmin.

Preoblemwith Displaying Utf8 Chars In Web Site
I have the following problem: I have a database entries with cyrillic characters and I cannot display them in my website (instead I get "?????"). I have set the files for the website in utf-8 character encoding and all the static characters in the web site are show as they should. The according table is in utf8_general_ci encoding and all the system character-/collation- variables are in utf8/utf8_general_ci encoding.

I would be very thankful for some help!

P.S.
character set client utf8
character set connection utf8
character set database utf8
character set filesystem binary
character set results utf8
character set server utf8
character set system utf8
collation connection utf8_general_ci
collation database utf8_general_ci
collation server utf8_general_ci

Setting Server Variables On A Hosted Site
I want to change my MySQL server variable to ft_min_word_len = 1; and get have it not read the stopword file (ft_stopword_file). This is running on my website's webhost. It is already running and I believe they have the access to the config files..

I tried setting it through a query, and while I can view all the server variables, trying to set them to anything gives me an "unknown variable" error. (I don't think I have access to mysqld, just queries and trying to convince my host that they are the ones to change this...)

Version Number Of Mysql On Active Web Site
how to tell the version of mysql I am using? I'm not technical and the person who installed this is nowhere to be found. But I do have access to the server. It is a 5.x on win2k.

Site User To A Paid Member? Database Design HELP
I am currently working on a website where there are 2 types of users. The regular site user and a paid member. I am trying to figure out the best way to design the database (mysql) without redundancy issues.

The site user can eventually become a paid member but a member does not necessarily have to be a regular site user (in terms of category). Information stored on a site user - first name, last name, address etc. The userID being the primary key. The member pretty much the same thing but new info will be memberID, join date, expiry date, status (pending, active, expired).

I thought the easiest way to do this was to have separate tables. Do you think the best way?

My thoughts are: When the regular site user becomes a member then store the userID in the members table.

The issue I am faced with is how to store the other pieces of information. The address is not mandatory for the site user but is mandatory for the member. So, if the site user has an address then store it in the member table? that's redundancy there. Then a member do not necessarily have to be a site user in the sense of storing the info in that table.

Design issues to think about
- activation of membership once a confirmed payment has been received - Client is using Paypal.
-What if the user clicks on membership and the user is also a site user?
-What if the user is logged in as a site user and clicks membership?

I would greatly appreciate your design recommendations.


PHP And MySQL Update Makes Our Site Behave Badly
our web host updated their php and mysql version to 5, and now our website is behaving badly theres no one going to visit it. This is what happens, if a page has to query 10 times before everything is done, sometimes the "error connecting to database" show after the 3rd query, sometimes at 5, sometimes at 7. sometimes it loads the page just as it use to be.

what the hell am i suppose to do? their technical support is nothing but a html page on the site, no support whatsoever!

we'll shift host in a month, but we need this sorted out fast,

Pull Data From 2 Database Tables Into 1 Table On My Site.
I got 2 tables: a dev_tasks and a task_history table. The task table has to record information about the task I am working on AND the history table is for the task history logs. I am trying to display info from both tables into 1 table on my site.

Most of the info will come from the dev_tasks table BUT i want to dedicate on column of the displayed info for the latest log made to the task_history table.

The common column to both tables is the 'taskid' column.

What would the query look like to pull the info from both tables, knowing that the taskid is common to both and that I want to display the last log per tasks from the task_history table?

A Seprate Database For PHPBB Or Merge The Tables With The Site?
I have a databse for the main website that will contain ~15 tables. Are there advantages/disadvantages to merging the phpBB tables with the one from the site or seprating the tables sets in 2 different databases?

Making Site Login Add Users To Phpbb Database Table
I have a login script for my site that I got off the net and was planning to use, but, I also wanted to make it so that when a user signed up thru the registration form it would also add them to the phpbb database's table. It wasn't discussed heavily from where i got the script but from what was mentioned the encryptions differ which results in a rejected login. Code:

Unable To Connect To Database Server. Can't Connect To MySQL Server On 'localhost' (10055)
I am running a PHP application with mySQL . Some times it gives the following error.
I do not understrand why this error occures .

today i am using the application but it is not giving the error but error occures yested day .

Unable to connect to Database Server. Can't connect to MySQL server on 'localhost' (10055).

Store Web Site Club Registration Data (was "MySQL Question")
I am working on a website for a club. One thing that they want included in the site is a way for people to register online for the club and their services and for this information to be put into a database for the owners to view. Is this something that I can do with MySQL?

Random Password Vs. User Created Password For Site Login
Are there any security issues or other concerns that make one preferable? The client is pushing for user created passwords.

I'm mapping out the basic functionality and front-end for a MySQL/PHP back-end that will be completed by a third party. I'm a novice to MySQL but familiar with PHP and their interaction. Mainly looking for anything to support one method over the other.

"Connect By" / Connect By Prior Clause
One thing that very annoying me in SQL SERVER is the lack of the "connect by" support. The other thing is that in order to take advantage of multi-processors/cores system, you have to pay a good deal of money.

Therefore, I'm examining MySQL now & wanted to know if there is a "Connect by" support in MySQL? It's not just syntax issue, but also performance issue. Anyhow, it's far more comfortable.

Connect From Www.1.com To Www.2.com
PHP

<? /*--------- DATABASE CONNECTION INFO---------*/ $hostname="www.1.com"; $mysql_login="myusername"; $mysql_password="mypassword"; $database="mydatabase"; // connect to the database server if (!($db = mysql_pconnect($hostname, $mysql_login , $mysql_password))){   die("Can't connect to database server.");     }else{   // select a database     if (!(mysql_select_db("$database",$db))){       die("Can't connect to database.");     } } ?>

CONNECT Or USE ?
We have a shell script where the mysql query occasionally hangs. I notice that the query uses CONNECT instead of the more usual USE. Can't actually find any info on the CONNECT command but it seems to work.

e.g.
TITLE=`mysql -u$DBUSER -p$DBPWD -h$DBSERVER -N -e "connect orinfo;select title from task where taskid='${TASKID}';"`

what to use, CONNECT or USE in this case?

Also, the taskid column is an integer. Could where taskid='${TASKID}' be confusing mysql because I have single quotes indicating a string?

See Once ! &amp; Help Me , Can Connect ! After I Can't Do ....... ?
the older thread goeing on, so i started new one,

Now i can get a connection, but i can't do anything with this connection
whenever i attempt to select a database or tables,
it saying permission denied, see my code once Plz

$con=@mysql_pconnect("localhost","root","abcd");
if (!$con)
echo "<br>Unable to connect",mysql_error();
else
echo "<br>connected",mysql_error();

$dbcon=@mysql_select_db("project",$con);
if ($dbcon)
echo "<Br>Database Selected";
else
echo "<br>Database not selected",mysql_error();

I got this as a result
connected
Database not selectedAccess denied for user: 'root@localhost' to database 'project'

the same thing happens in console also

Can't Connect
I was using Mysql-front to connect to a server running linux. I swapped
out my old desktop machine for a new one and now I can't connect. What
could I be missing on the new machine? They were both running windows 2000.

How To Connect To A SQL DB?
I have a MySql Database with some information which I would like to display on a screen! It sounds quite simple, but seems to be a big issue for me!

I stored the following script in a index.php file and open it in my browser over http://localhost/index.php. However I only get an empty page back without any error msg.
If I delete everything apart from <?php print("Hello"); ?> It works fine

PS: If I open the DB directly with Webmin the path is https://localhost.localdomain:10000/mysql/ and not local host? Does this make any difference? Code:

How To Connect
i using NetBeans 5.0 to connect to MySQL 5.0 database. the connection can work in the server computer but cannot work if i use different computer to connect. how to i set for remote connection.?

Cannot Connect
I am trying to install Textpattern - after correct upload, I have entered the correct MySQL username, password, and database. It's linked to the right path - I click next during installation and get the following:
Checking database connection…


Warning: mysql_connect(): Can't connect to MySQL server on 'localhost' (10061) in D:hshomesimplymysimplymysims.com extpatternsetupindex.php on line 195

Can’t connect to database.

Can Connect To My Db
just installed php 4, mysql server 4.1 and apache 2.0 on my winxp machine. i can connect to my db and create tables using mysql administrator program with the root login, but i can't connect to my db using php for some wierd reason...

Warning: mysql_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL client in C:Program FilesApache GroupApache2htdocsswordsOfTwilightinsert.php on line 13
Unable to select database

<?
$user="root";
$password="----------";
$database="swordsoftwilight";
mysql_connect(localhost,$user,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query=$query = "INSERT INTO members VALUES ('','Sinstone','--------','Paul Georges','20','Quebec, Canada','sinstone@gmail.com','')";
mysql_query($query);
mysql_close();
?>

Connect Using Asp
I have downloaded MySql 4.1.9 v and also the administrator zip which i found i mysql.com ,the odbc driver for mysql and the query browser.I have installed them and works fine.I can connect and also i have created a new database with a table inside.I have some questions and need to be answered.

1.How can i connect to mysql using ASP .I don't want to use odbc because i have found some examples for this.I want to use OleDb.Is it possible from an asp page to do that?Meanning with this that connect using oledb?

2.Where can i define the length of the database?Where can i find how many rows can accept?And how can i change that?Meaning with this what is the size of the database and how many rows the tables can accept.

3.For now i 'll test the database using the localhost or 127.0.0.1.I'm planning to be hosted from an ISP which is offering me a MySql database.Which are the files needed to deploy the database i have created on my machine?What else is needed to upload and fully function mysql database?

4.In most of the examples i looked at I saw that the passwords and the user name are written inside the asp page.How can i encrypt the password and the user name in Asp?

5.Is there an example using Myssql with Asp?

Can't Connect
I'm very new at this,to my understandig mysql supposed to be a built in db ,when i'm trying to connect i'm getting " error 1044: Access denied for user :@lolocalhost to database 'mysql'


when i'm trying to open DB the database i'm suuposed to be working on iget the same error. I didn't created it.
It saved in mysql/data.
I can query it from "mysqlmanager" but can't connect from the command line!!

The target is to connect to it from PHP file but I get no response there.

Cant Connect
Ive been digging far and wide and im using the old password option, like its mentioned here
http://forums.mysql.com/read.php?38,2511,5323

Ive also downloaded and installed the mysqli extension
http://dev.mysql.com/downloads/connector/php/

But I still get the same error. What could I be missing ?


Copyright © 2005-08 www.BigResource.com, All rights reserved