Gå til innhold

Installere mySQL


Anbefalte innlegg

Har tidligere installerte PHPtriad på maskinen min med php og mySQL. Nå tror jeg det er på tide å oppdatere noe av dette og lurte i den anledning på om jeg bør laste ned en nyere versjon av phptriad eller om det holder å laste ned mySQL? Har lastet det ned, men lurer litt på hvor det skal installeres. Skal det legges i mappen mySQL i apache mappen?

Lenke til kommentar
Videoannonse
Annonse

Merk at mysql installasjonen (og phpmyadmin) må du finne selv hvis du skal ha en siste versjon. Linken til php og apache er oppdatert slik at du får siste versjon.

 

Manually installing Apache/PHP/mySQL

~~~~~~~~~~~~~~~~~~~~~~~~~

 

This is actually very easy, and it will be a lot easier to maintain/upgrade than a preconfigged package...

 

1. Download the following four files ...

Apache2 -> http://www.powertech.no/apache/dist/httpd/...-x86-no_ssl.msi

PHP -> http://www.php.net/get/php-4.3.4-Win32.zip/from/a/mirror

mySQL -> http://www.mysql.com/downloads/download.ph...ror.anlx.net%2F

phpMyAdmin -> http://prdownloads.sourceforge.net/phpmyad...e_mirror=switch

 

2. Install Apache2 to c:/Apache

 

3. Unzip mysql zip and install into c:/Apache/mysql

 

4. Unzip php and copy all files into c:/Apache/php

 

5. Copy the following files into windows/system32 ...

all files from php/sapi

all files from php/dlls

php/php4ts.dll

 

6. Copy php/php.ini-dist into windows directory and rename it to php.ini

 

7. Open php.ini in text editor and make the following changes ...

change extension_dir to "c:\Apache\php\extensions"

change display_startup_errors to On

change upload_tmp_dir to "c:\apache\php\tmp" (dont forget to create this folder)

uncomment extension = php_gd2.dll

 

8. Save php.ini and close it

 

9. Open C:\Apache\Apache2\conf\httpd.conf in a text editor and make the following changes ...

Under the LoadModule entries, add ...

LoadModule php4_module "c:/Apache/php/sapi/php4apache2.dll"

AddType application/x-httpd-php .php

Change DirectoryIndex index.html index.html.var to DirectoryIndex index.html index.html.var index.php

 

10. Save httpd.conf and close it

 

11. Open the c:\Apache\mysql\bin folder and run winmysqladmin.exe, enter a username and password when prompted - WRITE THEM DOWN SOMEWHERE SAFE!

 

12. Start your Apache server.

 

Securing your htdocs folder

~~~~~~~~~~~~~~~~~~

 

If you want to keep your local server locked to outside users you can easily add a .htaccess that requires you to enter a username/password to gain access ...

 

1. Select Run from your start menu and type C:\Apache\Apache2\bin\htpasswd.exe -c .users yourname

 

2. Enter your password when prompted

 

3. This will create a file called .users inside your apache2/bin folder

 

4. Open your text editor and enter this text ...

AuthName "Restricted"

AuthType Basic

AuthUserFile "C:/Apache/Apache2/bin/.users"

<LIMIT GET POST>

require valid-user

</LIMIT>

 

5. Save the file as .htaccess in yout Apaches2/htdocs folder

 

6. Open Apache2/conf/httpd.conf in your text editor

 

7. Change the line AllowOverride None to AllowOverride AuthConfig

 

8. Save and exit

 

9. Restart Apache, when you go to your local server (http://localhost) you will have to enter the username and password you entered to gain access.

 

Installing phpMyAdmin

~~~~~~~~~~~~~~

 

1. Unzip the phpMyAdmin zip you downloaded earlier and copy it into your Apache2/htdocs folder

 

2. Open config.inc.php in a text editor

 

3. Enter the full path to your phpMyAdmin folder in the $cfg['PmaAbsoluteUri'] variable, ie, $cfg['PmaAbsoluteUri'] = 'http://localhost/phpMyAdmin-2.5.1';

 

4. Enter your mySQL username that you entered earlier in the $cfg['Servers'][$i]['user'] variable

 

5. Enter your mySQL password that you entered earlier in the $cfg['Servers'][$i]['password'] variable

 

6. Save the file and exit - phpMyAdmin is now ready to use and can be found at http://localhost/<your_phpMyAdmin_folder>

Lenke til kommentar

Opprett en konto eller logg inn for å kommentere

Du må være et medlem for å kunne skrive en kommentar

Opprett konto

Det er enkelt å melde seg inn for å starte en ny konto!

Start en konto

Logg inn

Har du allerede en konto? Logg inn her.

Logg inn nå
×
×
  • Opprett ny...