|
-
Jun 13th, 2002, 09:05 PM
#1
Thread Starter
PowerPoster
[Resolved] Access to mySQl
I have a database on my laptop that I want to transfer the contents of to a mySQL database on my server.
Is there an easy way to do this? I can put the access database on my server and/or convert it to a text file first or whatever. It has a few hundred records, so it's not huge, but it's more than I want to transfer manually. Any guidance is a appreciated.
Last edited by cafeenman; Jun 16th, 2002 at 03:48 PM.
-
Jun 13th, 2002, 09:19 PM
#2
PowerPoster
very simple way...
get Access to export the table into a csv file (File -> Export Save as type = Text Files txt, csv ...)
use phpmyadmin (which I know you have from previous threads ) to upload the csv into a table. Go to the table home. Find "Insert data from a textfile into table" link, click it. Browse the file on the disk, set the other options which will usually be Fields terminated by ,
Fields enclosed by "
Lines terminated by \n
You might have to mess with those a bit, e.g make lines terminated by = \r\n. Click submit...
-
Jun 13th, 2002, 09:23 PM
#3
Thread Starter
PowerPoster
Originally posted by chrisjk
very simple way...
get Access to export the table into a csv file (File -> Export Save as type = Text Files txt, csv ...)
use phpmyadmin (which I know you have from previous threads ) to upload the csv into a table. Go to the table home. Find "Insert data from a textfile into table" link, click it. Browse the file on the disk, set the other options which will usually be Fields terminated by ,
Fields enclosed by "
Lines terminated by \n
You might have to mess with those a bit, e.g make lines terminated by = \r\n. Click submit...
I installed PHP and mySQL and never figured out how to even start them on my computer. I'll see if I can figure out where this stuff is. It didn't put any shortcuts in my start menu, but I know where the folder is at least, so I'll look for .exe files there.
Thanks for replying.
-
Jun 13th, 2002, 09:29 PM
#4
Thread Starter
PowerPoster
All I have is a 20KB php.exe file that opens a console. I don't have a clue where php admin would be. Maybe I installed the wrong thing. It's PHP 4.2.something
-
Jun 13th, 2002, 09:42 PM
#5
Member
Originally posted by cafeenman
I installed PHP and mySQL and never figured out how to even start them on my computer.
http://www.turtletips.com/forums/sho...&threadid=2625 !
-
Jun 13th, 2002, 09:55 PM
#6
Stuck in the 80s
Originally posted by cafeenman
All I have is a 20KB php.exe file that opens a console. I don't have a clue where php admin would be. Maybe I installed the wrong thing. It's PHP 4.2.something
phpMyAdmin is a third party application.
-
Jun 13th, 2002, 09:59 PM
#7
Member
http://phpmyadmin.sourceforge.net/
Be sure to read the readme dealie before "installing" it.
-
Jun 13th, 2002, 10:00 PM
#8
Thread Starter
PowerPoster
OK, when I installed Apache a while back, I did get it running and I made a bunch of modifications to whatever file I had to modify. So I think Apache is working. I mean it's running, but I don't know if it knows about mySQL or vice-versa. I really wish I just had a rudimentary understanding of what this is supposed to do. I mean the fundamental theory behind it because I just don't understand anything at all about networking, services, etc. I know how to start an FTP program and upload a file. That's it.
Tutorial are good, but they generally don't teach. They just give step by step instructions. So when it's all up and running, I still don't know how it works.
Anyway, I'm at the configure php part.
-
Jun 13th, 2002, 10:06 PM
#9
Thread Starter
PowerPoster
Filbert, I added the last two lines in your tutorial to the .conf file and apache won't restart.
the line would be
c:/developer applications/php
I also tried
c:/develo~1/php
just in case it like dos names, but that didn't work either. What happens if I don't add these two lines at all?
-
Jun 13th, 2002, 10:18 PM
#10
Member
Are you on an NT-based OS?
-
Jun 13th, 2002, 10:18 PM
#11
Member
BTW use quotes for something like that.
-
Jun 13th, 2002, 10:18 PM
#12
Thread Starter
PowerPoster
C:\Developer applications\mySQL\bin>mysql install
ERROR 2003: Can't connect to MySQL server on 'localhost' (10061)
C:\Developer applications\mySQL\bin>mysqladmin install
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to MySQL server on 'localhost' (10061)'
Check that mysqld is running on localhost and that the port is 3306.
You can check this by doing 'telnet localhost 3306'
C:\Developer applications\mySQL\bin>
-
Jun 13th, 2002, 10:19 PM
#13
Thread Starter
PowerPoster
Originally posted by filburt1
Are you on an NT-based OS?
XP Pro
-
Jun 13th, 2002, 10:32 PM
#14
sound slike you need to start mysql. it is a seperate file that needs to be started. on mine anyway win98, not sure if you have it all setup as a module and service. look for an application that says something like mysqld.exe or mysql.exe.
then if you have the user setup it should work.
-
Jun 13th, 2002, 10:34 PM
#15
Member
c:/developer applications/php
Change to
"c:/developer applications/php"
Also it's --install, not install.
-
Jun 13th, 2002, 10:41 PM
#16
Thread Starter
PowerPoster
Apparently none of these things are liking the "localhost" Apache2 is working, but nothing else is. When I tried to configure mySQL, it gives me errors about "localhost" I don't know how to figure out what "host" I should be using.
Can one of you guys come over and show me how to do this? I'll give you an address. I'll probably be up for the next 20 hours or so, so any time in there will be fine. Actually, if I'm not awake when you get here, just let yourself in and go ahead and get started. Then I won't be in your way.
Thanks.
-
Jun 13th, 2002, 10:42 PM
#17
Thread Starter
PowerPoster
Originally posted by filburt1
Change to
Also it's --install, not install.
I tried the quotes, it just didn't like it.
LoadModule php4_module "c:/develper applications/php/sapi/php4apache.dll"
AddType application/x-httpd-php .php .phtml
-
Jun 13th, 2002, 10:45 PM
#18
Thread Starter
PowerPoster
when I use --install, it outputs all the options meaning that it didn't like what I typed.
I tried all these
mysqladmin install
mysqladmin --install
mysql install
mysql --install
mysql
mysqladmin
In each case it said "You suck and you have no business using us. Get a job at Taco bell!"
At least the error messages are amusing.
-
Jun 13th, 2002, 10:45 PM
#19
Member
Just try dumping it in a directory that doesn't have spaces and try again.
You did get the zip download, not the installer, right?
-
Jun 13th, 2002, 10:47 PM
#20
Thread Starter
PowerPoster
Originally posted by filburt1
You did get the zip download, not the installer, right?
Yes.
I'll try the no spaces directory. Does that mean you're not coming over?
-
Jun 13th, 2002, 10:48 PM
#21
Member
My bad, made a typo in the tutorial. This is the correct command for installing the service:
-
Jun 13th, 2002, 10:53 PM
#22
Thread Starter
PowerPoster
Originally posted by filburt1
My bad, made a typo in the tutorial. This is the correct command for installing the service:
Dude, I just uninstalled all that stuff. Seriously. But I'm just going to reinstall it in c:\php and c:\mySQL. I just hate having a lot of directories under my root drive.
OK, I'll get back to you once it's installed.
-
Jun 13th, 2002, 10:56 PM
#23
Thread Starter
PowerPoster
C:\mySQL\bin>mysqld-max-nt --install
Service successfully installed.
C:\mySQL\bin>
-
Jun 13th, 2002, 10:58 PM
#24
Thread Starter
PowerPoster
The Apache server still won't restart with these lines in the .conf file
LoadModule php4_module c:/php/sapi/php4apache.dll
AddType application/x-httpd-php .php .phtml
-
Jun 14th, 2002, 12:54 AM
#25
Thread Starter
PowerPoster
Guys, I don't know how to make this any clearer. I don't understand anything about hosting, servers or anything even remotely related to any of that. I am also not being able to find any information in regard to any of this that doesn't assume I know what they're talking about.
The bottom line is that I want to be able to develop pages on my machine and view them before I upload them. If I could do it without turning my machine into a server, I would, but I don't know how. Isn't there some kind of mySQL emulator or something so I don't have to do all this?? It seems kind of ridiculous to have to go through all this hassle just to create a web page.
Anyway, here's a mySQL dialog and I have no idea what to fill in the blanks.
-
Jun 14th, 2002, 07:31 AM
#26
instead of localhost try 127.0.0.1/yoursitefolder
-
Jun 14th, 2002, 08:05 AM
#27
Thread Starter
PowerPoster
Where would my server/root folder be? That's where it said I have to install myPHPAdmin.
I got the mySQL working. I had to start it on the command line and that dialog wasn't an issue any more. It configured itself I guess. Anyway, now I need to be able to actually create a database.
-
Jun 14th, 2002, 09:05 AM
#28
generally it is the same spot where you installed apache at. on my 98 machine it is
program files/apache/apache something/htdocs/
anything after htdocs I can have a a website. so the localhost or 127.0.0.1 is htdocs so if you have a folder under that called mysit then it would be
127.0.0.1/mysite/index.html
-
Jun 14th, 2002, 12:34 PM
#29
Thread Starter
PowerPoster
So you're saying I also have to move where my source files for my web site are?
So basically, let me see if I've got this straight. In order to debug php/mysql web pages on my machine I have to
1) Download about pieces of archaic, command-line software which are difficult to install, come with no or crappy instructions and take up a lot of disk space and resources.
2) Turn my machine into a server even though I really don't want my machine to be a server.
3) Rewrite all the configuration files that come with this software because it doesn't work as is.
4) Rearrange pre-existing things on my computer just to maybe get it all to work.
Microsoft isn't so bad after all. I just need to get an ASP server. this sucks. It really does. I can't see why anyone can argue that php or mysql has any virtues because it's consuming a whole lot of my time and I've accomplished virtually nothing with it and it still doesn't work on my machine. what a freakin' waste.
-
Jun 14th, 2002, 12:55 PM
#30
that is what you get for making apache run as console (or what ever it is called). I did it and it doesn't run all the time ( only when I am testing)
I changed maybe 5 lines in the httpd.conf file and 5 lines in php.ini. and none for mysql.
it took about 1 hour the first time. and yes you have to have a server to run asp or php or cgi. so you either put up with it and read tutorials or you don't debug like you thought you would. now if you want to make apache run when you want it to run, not when the computer starts, don't make it that way and don't make php as a module.
-
Jun 14th, 2002, 01:04 PM
#31
Thread Starter
PowerPoster
scoutt, I appreciate people trying to help me with this, but the fundamental problem is that I don't understand servers or anything related to them. I've said that in about every thread. I'm not getting taught how to fish so I can figure this out on my own and I can't find any meaningful info. I would have no problem purchasing a book or two to learn this stuff, but every book I've looked assumes that I know things that I don't know.
So basically this is just really frustrating. Even the parts that I have working, I don't know why they work. Nobody is explaining to me the underlying concept of what I'm doing. Instead I'm getting spoonfed information that maybe gets the job done, but doesn't really teach me anything. So every time I have a problem, I have to come back here and wait for a response before I can move on. I've been trying to get this to work off and on for about 2 months and I've gotten no where.
The fact is I still don't understand what the difference between a host and and IP is or how to choose a port or basically any of it. I know how to copy and paste the instructions I'm getting here but that isn't teaching me anything. It's just telling me what to do but not why I'm doing it.
-
Jun 14th, 2002, 01:18 PM
#32
well I can understand that, but to learn is to use it. and you can't use it until you get it running.
I can try to explain anything ou want to know, but I don't run XP so I will have a hard time explaining hat apache does on that system.
a host and a IP are pretty much the same. a host has to have a IP and then that IP gets turned into a domain name. so when you connect ot the net you are connecting to a domain then it gets turned into an IP. that is nothing to do with you. so don't worry about it. now your ports are a chip on the motherboard, you have 65000 ports to choose from. see how this can get confusing. Why would you need to pick a port, most of the time leave it as default.
now Apache is defaulted with localhost (internal to your machine - server) I can't connect to your server using localhost or 127.0.0.1 as that is your and yours only. when apache gets installed it installs like any other program. but when you run it is takes control of the machine (in a server like way)and then if you type 27.0.0.1/mysite/index.html the page will come out, correct, so if you have php installed and you ran a page with the php extension, apache will understand wha tit is because you changed that line in the httpd.conf file.
AddType application/x-httpd-php .php .phtml
that line does what I jsut said. so apache sees that you want to run a .php page and looks to php.exe (in not in module mode) and says please parse trhis file for me so I can output it to the browser. php says ok buddy here it is. so that is how it goes. same with php and mysql. php says oh I have a line that is part of mysql so I need to ask him, hey mysql, can you get me this info and mysql says sure good friend here you go, php says thanks friend and turns around and gives it to apache so it can out put it to the browser.
does all that make since? if you have more questions come on back, that is what this forum is for is to help people like you.
-
Jun 14th, 2002, 01:31 PM
#33
Thread Starter
PowerPoster
scoutt, thanks for that information. Seriously. 
I still haven't gotten those two lines to work in the .conf file. Apache2 won't restart.
How do I actually tell it to open a php file in my browser? What's the command or whatever to have it go through apache?
-
Jun 15th, 2002, 08:49 PM
#34
no command, apache knows what to do by those lines you inserted. like I said I don't know anything about running it like the way you are. but I can say the way I do it, you have to ahve more lines in it than that. but if you type in 127.0.0.1/mysite/index.php it will see the php and start talking to php for the parse of that file.
does that make since?
-
Jun 15th, 2002, 08:52 PM
#35
Thread Starter
PowerPoster
Does my site have to absolutely be under the httdocs folder of apache or can it be anywhere on my system. I still don't have this working.
I've got apache running
I think I have mySQL working and I think I have PHP working, but I can't figure out how to create tables. I downloaded myPHPAdmin, but It's just a bunch of PHP files. I'm not sure what I'm supposed to do with it.
-
Jun 15th, 2002, 09:06 PM
#36
ok somewhere in your httpd.conf file you have the location for site. like I said when you make it run as a console you do things differently.
DocumentRoot queals your site. so if you have "DocumentRoot "C:/Program Files/Apache Group/Apache/htdocs" that is the url for your site. it usually equals 127.0.0.1 or localhost.
you can change that to what ever you like, but you have to change this line
<Directory "C:/Program Files/Apache Group/Apache/htdocs"> to whatever you change the DocumentRoot too.
doea that make since?
lijke I said it is different than win98 installation
-
Jun 15th, 2002, 09:14 PM
#37
Thread Starter
PowerPoster
scoutt, this is really weird. I couldn't get it to work, so I typed in just http://127.0.0.1 and it found my files.
But the weird part is I copied them a couple days ago to the htdocs folder and it's opening the original files.
In other words, apache is installed in
c:\program files\apache group\apache2
But my web site files are in
c:\projects\web site\public_html
It's opening the site in my projects folder, not the copy in my htdocs folder under apache2.
Also, it doesn't know what to do with the php files. They are getting opened as screwed up html if you know what I mean. it's parsing the php into html instead of executing the code.
-
Jun 15th, 2002, 09:47 PM
#38
if you typed in 127.0.0.1 and got you c drive then you don't have apache configured right. you should have gotten a page that says
"Seeing this instead of the website you expected"
that will display if you type in 127.0.0.1 and you don't have a index.html page in it. if you get something else then you didn't set it up correctly.
my advice is to uninstall it and start over. you have something messed up.
when you install it make sure you select the default options and make it so it doesn't run as a console. that way it won't run all the time.
if you need help let us know I will try to keep an eye on this to help you.
-
Jun 15th, 2002, 09:48 PM
#39
Thread Starter
PowerPoster
I'm following the instructions that come with phpMyAdmin as closely as I can, but like the rest, they suck bollocks!
What do I do with this? I've tried various paths, etc, and all it keeps telling me is that url can't be found. The actual path is
C:\Projects\Web Site\public_html\phpMyAdmin-2.2.6\
I've tried the full path with and without the public_html as well as forward slashes, back slashes, with http and without. etc. Nothing works.
PHP Code:
$cfgPmaAbsoluteUri = 'http://127.0.0.1/phpMyAdmin-2.2.6/';
/**
* Server(s) configuration
*/
$i = 0;
// The $cfgServers array starts with $cfgServers[1]. Do not use $cfgServers[0].
// You can disable a server config entry by setting host to ''.
$i++;
$cfgServers[$i]['host'] = 'localhost'; // MySQL hostname
$cfgServers[$i]['port'] = ''; // MySQL port - leave blank for default port
$cfgServers[$i]['socket'] = ''; // Path to the socket - leave blank for default socket
$cfgServers[$i]['connect_type'] = 'tcp'; // How to connect to MySQL server ('tcp' or 'socket')
$cfgServers[$i]['controluser'] = ''; // MySQL control user settings
// (this user must have read-only
$cfgServers[$i]['controlpass'] = ''; // access to the "mysql/user"
// and "mysql/db" tables)
$cfgServers[$i]['auth_type'] = 'config'; // Authentication method (config, http or cookie based)?
$cfgServers[$i]['user'] = 'my username'; // MySQL user
$cfgServers[$i]['password'] = 'my password'; // MySQL password (only needed
-
Jun 15th, 2002, 09:52 PM
#40
Thread Starter
PowerPoster
Originally posted by scoutt
if you typed in 127.0.0.1 and got you c drive then you don't have apache configured right. you should have gotten a page that says
"Seeing this instead of the website you expected"
that will display if you type in 127.0.0.1 and you don't have a index.html page in it. if you get something else then you didn't set it up correctly.
my advice is to uninstall it and start over. you have something messed up.
when you install it make sure you select the default options and make it so it doesn't run as a console. that way it won't run all the time.
if you need help let us know I will try to keep an eye on this to help you.
I think the reason it's doing that is because I actually had Apache working at one point and I never changed it. It's not running as a console, e.g. DOS window. The instructions that come with this are obviously written by the people who created it and don't seem to have any insight into the fact that other people can't read their minds. I mean they have instructions like.
"complete the entry for <insert a weird variable name here>" like I'm supposed to know *** that is.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|