Search Results

Search found 6517 results on 261 pages for 'localhost'.

Page 186/261 | < Previous Page | 182 183 184 185 186 187 188 189 190 191 192 193  | Next Page >

  • vs2003: identify the referrer page in asp.net

    - by dotnet-practitioner
    Hi, In VS2003, I am trying to find out the particular page where the request is coming from. I want to identify the exact aspx page name. Is there a way to only get the page name or some how strip the page name? Currently I am using the following instruction... string referencepage = HttpContext.Current.Request.UrlReferrer.ToString(); and I get the following result... "http://localhost/MyPage123.aspx?myval1=3333&myval2=4444; I want to get the result back with out any query string parameters and be able to identify the page MyPage123.aspx accurately... How do I do that?? Thanks

    Read the article

  • having problems using Zend_Db_Table_Abstract::createRow()

    - by Gootik
    Hey, I have built a model that extends Zend_Db_Table_Abstract and I can't figure out why I can't use createRow(); here is my code: class Model_User extends Zend_Db_Table_Abstract { public function createUser() { $row = $this->createRow(); $row->name = 'test'; $row->save(); } } and in a controller I use: $userModel = new Model_User(); $userModel->createUser(); which when run displays an error An error occurred Application error here is my setup in application.ini resources.db.adapter = "pdo_mysql" resources.db.params.host = "localhost" resources.db.params.username = "root" resources.db.params.password = "pass" resources.db.params.dbname = "app_db" resources.db.isDefaultTableAdapter = true I am sure that my user/pass/dbname is correct. I would appreciate it if you point me in the right direction.

    Read the article

  • php var_dump returning blank array

    - by Oroku
    I'm following this tutorial on youtube: https://www.youtube.com/watch?v=VSF5p00uorc Around 4:28 - I get the following array when I load the sql.php page as in the tutorial: array(8) { [1]=> NULL [2]=> NULL [3]=> NULL [4]=> NULL [5]=> NULL [6]=> NULL [7]=> NULL [8]=> NULL } I do have 8 ids all with values in my data table. This is my code: <?php $con = mysqli_connect("localhost","root","","test2") or die('error'); $query = "select * from data"; $result = mysqli_query($con,$query); while($row = mysqli_fetch_array($result)) { $id = $row['id']; $feed = $row['feed']; $data[$id] = $feed; } var_dump($data); ?>

    Read the article

  • Duplication in mysql/php

    - by user1334095
    I have a problem in the code.i have two tables 'sms' and 'bd_paid_bribe'.sms table has a column 'Message' and bd_paid_bribe table has a column 'c_addi_info'.when i execute the code first time all the values of Message column are inserted into c_addi_info column.when i enter a record for the second time instead of inserting the new record, all the records of Message column are inserted into bd_paid_bribe column.can u modify the code and provide a solution to avoid duplication and to insert only the newly added record. <?php $con=mysql_connect('localhost','root',''); if(!$con) { die("couldn't connect"); } mysql_select_db("ipab2",$con); $rs2=mysql_query(" select max(sms_index) from tab3"); do { $rs=mysql_query("insert into tab3(sms_index)select max(sms_index) from sms"); $rs3=mysql_query("SELECT max(sms_index) FROM sms"); $rs1=mysql_query("insert into bd_paid_bribe(c_addi_info) select Message from sms "); }while($rs2>$rs3); ?>

    Read the article

  • xmlhttprequest vs jquery load();

    - by testkhan
    i am trying to making php ajax based chat system....and i have developed it successfully...i am using jquery load() with setInterval to reload chat every 1 second and it works fine on my localhost....but when i uploaded it on my hosting server it also works fine ... but problem is that after few mintues of chat the server takes to much long gets heavy loaded so that my server goes and and site goes down... my question is that, why it is happening so far...and what is the solution...should i use standard xmlhttprequest instead of load() or $.ajax() instead of load();

    Read the article

  • Downloading image from server without file extension (NSData to UIImage)

    - by Msencenb
    From my server I'm pulling down a url that is supposed to simply be a profile image. The relevant code for pulling down the image from the urls is this: NSString *urlString = [NSString stringWithFormat:@"%@%@",kBaseURL,profile_image_url]; profilePic = [UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:urlString]]]; My url is in the format (note no file extension on the end since its dynamically rendered) localhost:8000/people/1/profile_image If I load the url in my browser the image displays; however the code above for pulling down the UIImage does not work. I've verified that the code does pull an image from a random site on the interwebs. Any thoughts on why this is happening?

    Read the article

  • cant get ajax response (JSON) to call 'success' function?

    - by Haroldo
    for some reason the success function isnt being called? javscript: $.ajax({ type: 'POST', url: 'http://localhost/hf_latest_desktop/st_pages/user_area/acc_buttons/pass_change/pass_change_ajax.php', data: data, dataType: 'json', success: function(e){ console.log(e); if(e.status == 'success'){ alert('your password has been changed!'); } if(e.status == 'error1'){ alert('please fill in all inputs!'); } if(e.status == 'error2'){ alert('password incorrect!'); } if(e.status == 'error3'){ alert('change failed!'); } } }); php file ajax is calling to: <?php session_start(); session_cache_limiter('nocache'); header('Expires: ' . gmdate('r', 0)); header('Content-type: application/json'); $status = 'error1'; //for sake of example ?> {'status':'<?php echo $status; ?>'}

    Read the article

  • JQuery .get() only passing first two data parameters in url

    - by The.Anti.9
    I have a $.get() call to a PHP page that takes 4 GET parameters. For some reason, despite giving the $.get() call all 4, it only passes the first two. When I look at the dev console in chrome, it shows the URL that gets called, and it only passes action and dbname. Heres the code: $.get('util/util.php', { action: 'start', dbname: db, url: starturl, crawldepth: depth }, function(data) { if (data == 'true') { status = 1; $('#0').append(starturl + "<ul></ul>"); $('#gobutton').hide(); $('#loading').show("slow"); while(status == 1) { setTimeout("update()",10000); } } else { show_error("Form data incomplete!"); } }); and heres the URL that I see in the developer console: http://localhost/pci/util/util.php?action=start&dbname=1hkxorr9ve1kuap2.db

    Read the article

  • Facing difficulty in moving the two id's

    - by user1806560
    By means of <?php echo $productlist->productid;?> in href i am passing the productid,its fine based on that i can able to display the items. The url is looking like this when i am passing like this http://localhost/sample/index.php/userlogin/items/35 . <ul class="left_menu"> <li class="odd"><a href="<?php echo BASE_INDEX_URL;?>/userlogin/items/<?php echo $productlist->productid;?>"> <?php echo $productlist->productname; ?> </a></li> </ul> My model is taking the value like this public function items($productid=0) { } But i want to pass one more id as categoryid in the href, how can i do that My model is taking the value like this(for 2 parameters) public function items($productid=0,$categoryid=0) { }

    Read the article

  • php/mysql question, retrieving information

    - by chance
    Hey SO, I have a question, pretty new at PHP and MySql but was curious is it possible to display only the most recent column to a table, from a database? I know it is possible to display a list of all information, or if you have just one column of information in your table to display that using the Here is my code for my basic script (just loads 1 column of information) I would like it to only print out the recent column i added to the table $con = mysql_connect ("localhost","username","password"); if (!$con) { die ('Could not connect:' . mysql_error()0; } mysql_select_db("db_name", $con); $result = mysql_query(Select column FROM table"); while($row = mysql_fetch_array($result)) { echo $row['column']; } mysql_close($con); * keep in mind, im not looking for someone to shoot me my code with it completed, though it would be handy, however just giving me the options of what I have to do, or what the script is called would be plentiful enough for my research, thanks!

    Read the article

  • No route matches - after login attempt - even though the route exists?

    - by datorum
    I am working on a rails application and added a simple login system according to a book. I created the controller admin: rails generate controller admin login logout index It added the following routes to routes.db get "admin/login" get "admin/logout" get "admin/index" I can got to http://localhost:3000/admin/login there is no problem at all. But when I try to login I get: No route matches "/admin/login"! Now, the first confusing part is that the "login" method of my AdminController is not executed at all. The second confusing part is that this code works like a charm - redirects everything to /admin/login: def authorize unless User.find_by_id(session[:user_id]) flash[:notice] = "you need to login" redirect_to :controller => 'admin', :action => 'login' end end Sidenotes: I restarted the server several times. I tried a different browser - to be sure there is no caching problem.

    Read the article

  • I having a problem with the mysqli free() member function

    - by neo skosana
    Hi I have code where I connected to the database like so: $db = new mysqli("localhost", "user", "pass", "company"); Now when I query the database like so: //query calls to a stored procedure 'user_info' $result = $db->query("CALL user_info('$instruc', 'c_register', '$eml', '$pass', '')"); //I use the $result This query works well. Now when I try and free that result like so: $result->free(); or $result->close(); It seems like it doesn't do anything because $result is still set. When I try to run another query it gives me this error: Fatal error: Call to a member function fetch_array() on a non-object in... For me to run this other query I have to close the db conection and connect again, then it will work. I want to know if there is a way I could run the other query without having to disconnect and reconnect to the database. thanks in advance.

    Read the article

  • Configuring jdbc-pool (tomcat 7)

    - by john
    i'm having some problems with tomcat 7 for configuring jdbc-pool : i`ve tried to follow this example: http://www.tomcatexpert.com/blog/2010/04/01/configuring-jdbc-pool-high-concurrency so i have: conf/server.xml <GlobalNamingResources> <Resource type="javax.sql.DataSource" name="jdbc/DB" factory="org.apache.tomcat.jdbc.pool.DataSourceFactory" driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/mydb" username="user" password="password" /> </GlobalNamingResources> conf/context.xml <Context> <ResourceLink type="javax.sql.DataSource" name="jdbc/LocalDB" global="jdbc/DB" /> <Context> and when i try to do this: Context initContext = new InitialContext(); Context envContext = (Context)initContext.lookup("java:/comp/env"); DataSource datasource = (DataSource)envContext.lookup("jdbc/LocalDB"); Connection con = datasource.getConnection(); i keep getting this error: javax.naming.NameNotFoundException: Name jdbc is not bound in this Context at org.apache.naming.NamingContext.lookup(NamingContext.java:803) at org.apache.naming.NamingContext.lookup(NamingContext.java:159) pls help tnx

    Read the article

  • Pushing to an array not working as expected

    - by Ross Attrill
    When I execute the code below, my array 'tasks' ends up with the same last row from the dbi call repeated for each row in the database. require 'dbi' require 'PP' dbh = DBI.connect('DBI:ODBC:Driver={SQL Server Native Client 10.0};Server=localhost,1433;Database=db;Uid=db;Pwd=mypass', 'db', 'mypass') sth = dbh.prepare('select * from TASK') sth.execute tasks = Array.new while row=sth.fetch do p row tasks.push(row) end pp(tasks) sth.finish So if I have two rows in my TASK table, then instead of getting this in the tasks array: [[1, "Task 1"], [2, "Task 2"]] I get this [[2, "Task 2"], [2, "Task 2"]] What am I doing wrong?

    Read the article

  • Preventing SQL injecting in a database class

    - by Josh
    I'm building a database class and thought it'd be a good idea to incorporate some form of SQL injection prevention (duh!). Here's the method that runs a database query: class DB { var $db_host = 'localhost'; var $db_user = 'root'; var $db_passwd = ''; var $db_name = 'whatever'; function query($sql) { $this->result = mysql_query($sql, $this->link); if(!$this->result) { $this->error(mysql_error()); } else { return $this->result; } } } There's more in the class than that but I'm cutting it down just for this. The problem I'm facing is if I just use mysql_real_escape_string($sql, $this->link); then it escapes the entire query and leads to a SQL syntax error. How can I dynamically find the variables that need to be escaped? I want to avoid using mysql_real_escape_string() in my main code blocks, i'd rather have it in a function. Thanks.

    Read the article

  • Getting an Ajax response from Zend Framework Controller

    - by JavaLava
    I'm doing an Ajax request on one of my views to a Controller but I am unable to send back a response to the Ajax method. In the snippet below, I am trying to send the word 'hellopanda' back but in the alert message, I'll get data as an object. View : $.ajax({ type: "POST", url: "localhost/some-activity", data: dataString, success: function(data) { alert( "Data is: " + data); //do something with data }, error: function(data){ alert( "Data is: " + data); //do something with data }, onComplete: function(){ } }); Controller: public function someActivityAction(){ //do stuff echo "hellopanda"; } I'm pretty sure the echo is the problem. Any insights on to how to do a proper response to the view would be greatly appreciated.

    Read the article

  • mysql_close(): supplied argument is not a valid MySQL-Link resource

    - by maxedison
    I'm trying to get the hang of using custom session handlers to store session data in a MySQL database. However, I keep getting the following warning: mysql_close(): supplied argument is not a valid MySQL-Link resource Here's the code I'm using, which I got from here: function _open(){ global $_sess_db; $_sess_db = mysql_connect("localhost", "root", "******"); if ($_sess_db) { return mysql_select_db('style', $_sess_db); } return false; } function _close(){ global $_sess_db; return mysql_close($_sess_db); //error happens here } The full text of the error message ultimately points to the final "return mysql_close($_sess_db);" line. I can confirm that the mysql_connect info does in fact work, and I do have the rest of the session handler functions defined as well. And in case it helps, I get these errors immediately upon page load, without actually calling any of the session handler functions, and without having any current sessions open.

    Read the article

  • Array to string conversion in (cant get it to work)

    - by user2966551
    ok I am trying to pull a a specific row of data that corresponds to the username logged in. on my page I have started my session but for some reason I cant get the code to work.i keep getting a "Array to string conversion in " on the line " WHERE username = '$_SESSION[user]'");" what am I doing wrong? if I set username = a set username it works but I need it to draw from the session id so it will display different values based on whos logged in. <?php $con=mysqli_connect("localhost","root","xxx","xxxx"); // Check connection if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } $result = mysqli_query($con,"SELECT * FROM users WHERE username = '$_SESSION[user]'"); while($row = mysqli_fetch_array($result)) { echo $row['username'] . " " . $row['att']; echo "<br>"; } ?>

    Read the article

  • phpMySql connection

    - by Eiriko Pedroza
    PL = VB.net Issue: format of the initialization string does not conform to specification starting at index 17 connection string: objconn.ConnectionString = ("server=" & txtServer.Text & ";" _ & "user id=" & "'" & txtUserId.Text & ";" _ & "password=" & txtPassword.Text & ";" _ & "database=try") Try objconn.Open() MsgBox("Connected") objconn.Close() Catch ex As Exception MsgBox(ex.ToString) End Try -objconn is declared as new mysqlconnection every time I run the application and try to login, i keep on receiving this error message, I already double checked my line of connection string. im using 'localhost' as server and 'root' as username, password is blank. thank you in advance for your response

    Read the article

  • My $query->fetch() doesn't work

    - by Tae
    Question edited following the comments. It still doesn't work. Hi there, I'm trying to learn how PDO works, but my script: $database = new PDO('mysql:host=localhost;dbname=***', '***', '***'); $query = $database->prepare("SELECT nombre, tecnica, tamanno, estado FROM obra WHERE anno = ?"); $query->execute(array('2009')); while ($item = $query->fetch(PDO::FETCH_ASSOC)) { $item['nombre']; } Prints nothing. If I do: var_dump($query->fetch()) I get bool(false). After reading lots of examples I can't figure out what I'm doing wrong. Thanks in advance.

    Read the article

  • How to SetCookie() in a System.Net.HttpWebRequest request for another Page2.aspx?

    - by Mike108
    How can I SetCookie in Page1.aspx by a System.Net.HttpWebRequest request for Page2.aspx which handle the SetCookie() function? Page1.aspx and Page2.aspx are in the same webapp. Page1.aspx: protected void Page_Load(object sender, EventArgs e) { string url = "http://localhost/Page2.aspx"; System.Net.HttpWebRequest myReq = (System.Net.HttpWebRequest)System.Net.HttpWebRequest.Create(url); System.Net.HttpWebResponse HttpWResp = (System.Net.HttpWebResponse)myReq.GetResponse(); System.IO.Stream myStream = HttpWResp.GetResponseStream(); } Page2.aspx: protected void Page_Load(object sender, EventArgs e) { string userName = "Lily"; FormsAuthentication.SetAuthCookie(userName, true); }

    Read the article

  • PHP] How can I connect to MySQL on wamp server?

    - by user294359
    This might be ridiculously easy for you.. but I've been struggling with this for an hour.. :( <?php $connect = mysql_connect("localhost:8080", "root", "mypassword"); echo($connect);?> This is the code that I'm trying to run - you can see that I'm using 8080 as my port number and, of course, I have html codes as well. However, it gives me the following error msgs whenever I try to open the php file. ==================================================================================== Warning: mysql_connect() [function.mysql-connect]: MySQL server has gone away in C:\wamp\www\php_sandbox\index.php on line 2 Warning: mysql_connect() [function.mysql-connect]: Error while reading greeting packet. PID=4932 in C:\wamp\www\php_sandbox\index.php on line 2 Warning: mysql_connect() [function.mysql-connect]: MySQL server has gone away in C:\wamp\www\php_sandbox\index.php on line 2 ===================================================================================== I don't know... what's wrong with this. Is it because of the port number?

    Read the article

  • PHP $_REQUEST doesn't contain all $_GET varaibles

    - by pinky0x51
    Until today I thought that $_REQUEST always contains all variables form $_POST and $_GET. But today I had the strange experience that one variable is part of $_GET but not part of $_REQUEST. I played a little bit around with the URL which hands over the parameters and it seems like always the fist parameter is missing in the $_REQUEST array. Do you have any idea why this could happen? Thanks! URL: localhost/?app=files&getfile=ajax/newfile.php?dir=%2Ftest4&source=http%3A%2F%2Fl??ocalhost%2Fimg%2Flogo.svg&filename=logo.svg&requesttoken=e250827c341650990cd4

    Read the article

  • MySQL Query Problem

    - by user559744
    Hello guys, I'm getting following error message. Please help me. Thanks Notice: Trying to get property of non-object in C:\xampp\htdocs\my\include\user_functions.php on line 34 Here is my Code $conn = db_connection(); if($conn == false) { user_error('Unable to connect to database'); return false; } $query = "UPDATE user SET passwd = '".$new_passwd."' WHERE username = '".$username."' "; $result=$conn->query($query); if($result == false) { user_error('Query Error'.$conn->error); return false; } if($result->num_rows == 1) { echo 'Password changed'; } else { echo 'Failed '; } here is my db_connection function db_connection() { $db = new mysqli('localhost','root','','php_login'); if(!$db) { echo 'Could not connect to database server'; } else { return $db; } }

    Read the article

  • Problem setting up Master-Master Replication in MySQL

    - by Andrew
    I am attempting to setup Master-Master Replication on two MySQL database servers. I have followed the steps in this guide, but it fails in the middle of Step 4 with SHOW MASTER STATUS; It simply returns an empty set. I get the same 3 errors in both servers' logs. MySQL errors on SQL1: [ERROR] Failed to open the relay log './sql1-relay-bin.000001' (relay_log_pos 4) [ERROR] Could not find target log during relay log initialization [ERROR] Failed to initialize the master info structure MySQL Errors on SQL2: [ERROR] Failed to open the relay log './sql2-relay-bin.000001' (relay_log_pos 4) [ERROR] Could not find target log during relay log initialization [ERROR] Failed to initialize the master info structure The errors make no sense because I'm not referencing those files in any of my configurations. I'm using Ubuntu Server 10.04 x64 and my configuration files are copied below. I don't know where to go from here or how to troubleshoot this. Please help. Thanks. /etc/mysql/my.cnf on SQL1: # # The MySQL database server configuration file. # # You can copy this to one of: # - "/etc/mysql/my.cnf" to set global options, # - "~/.my.cnf" to set user-specific options. # # One can use all long options that the program supports. # Run program with --help to get a list of available options and with # --print-defaults to see which it would actually understand and use. # # For explanations see # http://dev.mysql.com/doc/mysql/en/server-system-variables.html # This will be passed to all mysql clients # It has been reported that passwords should be enclosed with ticks/quotes # escpecially if they contain "#" chars... # Remember to edit /etc/mysql/debian.cnf when changing the socket location. [client] port = 3306 socket = /var/run/mysqld/mysqld.sock # Here is entries for some specific programs # The following values assume you have at least 32M ram # This was formally known as [safe_mysqld]. Both versions are currently parsed. [mysqld_safe] socket = /var/run/mysqld/mysqld.sock nice = 0 [mysqld] # # * Basic Settings # # # * IMPORTANT # If you make changes to these settings and your system uses apparmor, you may # also need to also adjust /etc/apparmor.d/usr.sbin.mysqld. # user = mysql socket = /var/run/mysqld/mysqld.sock port = 3306 basedir = /usr datadir = /var/lib/mysql tmpdir = /tmp skip-external-locking # # Instead of skip-networking the default is now to listen only on # localhost which is more compatible and is not less secure. bind-address = <SQL1's IP> # # * Fine Tuning # key_buffer = 16M max_allowed_packet = 16M thread_stack = 192K thread_cache_size = 8 # This replaces the startup script and checks MyISAM tables if needed # the first time they are touched myisam-recover = BACKUP #max_connections = 100 #table_cache = 64 #thread_concurrency = 10 # # * Query Cache Configuration # query_cache_limit = 1M query_cache_size = 16M # # * Logging and Replication # # Both location gets rotated by the cronjob. # Be aware that this log type is a performance killer. # As of 5.1 you can enable the log at runtime! #general_log_file = /var/log/mysql/mysql.log #general_log = 1 log_error = /var/log/mysql/error.log # Here you can see queries with especially long duration #log_slow_queries = /var/log/mysql/mysql-slow.log #long_query_time = 2 #log-queries-not-using-indexes # # The following can be used as easy to replay backup logs or for replication. # note: if you are setting up a replication slave, see README.Debian about # other settings you may need to change. server-id = 1 replicate-same-server-id = 0 auto-increment-increment = 2 auto-increment-offset = 1 master-host = <SQL2's IP> master-user = slave_user master-password = "slave_password" master-connect-retry = 60 replicate-do-db = db1 log-bin= /var/log/mysql/mysql-bin.log binlog-do-db = db1 binlog-ignore-db = mysql relay-log = /var/lib/mysql/slave-relay.log relay-log-index = /var/lib/mysql/slave-relay-log.index expire_logs_days = 10 max_binlog_size = 500M # # * InnoDB # # InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/. # Read the manual for more InnoDB related options. There are many! # # * Security Features # # Read the manual, too, if you want chroot! # chroot = /var/lib/mysql/ # # For generating SSL certificates I recommend the OpenSSL GUI "tinyca". # # ssl-ca=/etc/mysql/cacert.pem # ssl-cert=/etc/mysql/server-cert.pem # ssl-key=/etc/mysql/server-key.pem [mysqldump] quick quote-names max_allowed_packet = 16M [mysql] #no-auto-rehash # faster start of mysql but no tab completition [isamchk] key_buffer = 16M # # * IMPORTANT: Additional settings that can override those from this file! # The files must end with '.cnf', otherwise they'll be ignored. # !includedir /etc/mysql/conf.d/ /etc/mysql/my.cnf on SQL2: # # The MySQL database server configuration file. # # You can copy this to one of: # - "/etc/mysql/my.cnf" to set global options, # - "~/.my.cnf" to set user-specific options. # # One can use all long options that the program supports. # Run program with --help to get a list of available options and with # --print-defaults to see which it would actually understand and use. # # For explanations see # http://dev.mysql.com/doc/mysql/en/server-system-variables.html # This will be passed to all mysql clients # It has been reported that passwords should be enclosed with ticks/quotes # escpecially if they contain "#" chars... # Remember to edit /etc/mysql/debian.cnf when changing the socket location. [client] port = 3306 socket = /var/run/mysqld/mysqld.sock # Here is entries for some specific programs # The following values assume you have at least 32M ram # This was formally known as [safe_mysqld]. Both versions are currently parsed. [mysqld_safe] socket = /var/run/mysqld/mysqld.sock nice = 0 [mysqld] # # * Basic Settings # # # * IMPORTANT # If you make changes to these settings and your system uses apparmor, you may # also need to also adjust /etc/apparmor.d/usr.sbin.mysqld. # user = mysql socket = /var/run/mysqld/mysqld.sock port = 3306 basedir = /usr datadir = /var/lib/mysql tmpdir = /tmp skip-external-locking # # Instead of skip-networking the default is now to listen only on # localhost which is more compatible and is not less secure. bind-address = <SQL2's IP> # # * Fine Tuning # key_buffer = 16M max_allowed_packet = 16M thread_stack = 192K thread_cache_size = 8 # This replaces the startup script and checks MyISAM tables if needed # the first time they are touched myisam-recover = BACKUP #max_connections = 100 #table_cache = 64 #thread_concurrency = 10 # # * Query Cache Configuration # query_cache_limit = 1M query_cache_size = 16M # # * Logging and Replication # # Both location gets rotated by the cronjob. # Be aware that this log type is a performance killer. # As of 5.1 you can enable the log at runtime! #general_log_file = /var/log/mysql/mysql.log #general_log = 1 log_error = /var/log/mysql/error.log # Here you can see queries with especially long duration #log_slow_queries = /var/log/mysql/mysql-slow.log #long_query_time = 2 #log-queries-not-using-indexes # # The following can be used as easy to replay backup logs or for replication. # note: if you are setting up a replication slave, see README.Debian about # other settings you may need to change. server-id = 2 replicate-same-server-id = 0 auto-increment-increment = 2 auto-increment-offset = 2 master-host = <SQL1's IP> master-user = slave_user master-password = "slave_password" master-connect-retry = 60 replicate-do-db = db1 log-bin= /var/log/mysql/mysql-bin.log binlog-do-db = db1 binlog-ignore-db = mysql relay-log = /var/lib/mysql/slave-relay.log relay-log-index = /var/lib/mysql/slave-relay-log.index expire_logs_days = 10 max_binlog_size = 500M # # * InnoDB # # InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/. # Read the manual for more InnoDB related options. There are many! # # * Security Features # # Read the manual, too, if you want chroot! # chroot = /var/lib/mysql/ # # For generating SSL certificates I recommend the OpenSSL GUI "tinyca". # # ssl-ca=/etc/mysql/cacert.pem # ssl-cert=/etc/mysql/server-cert.pem # ssl-key=/etc/mysql/server-key.pem [mysqldump] quick quote-names max_allowed_packet = 16M [mysql] #no-auto-rehash # faster start of mysql but no tab completition [isamchk] key_buffer = 16M # # * IMPORTANT: Additional settings that can override those from this file! # The files must end with '.cnf', otherwise they'll be ignored. # !includedir /etc/mysql/conf.d/

    Read the article

< Previous Page | 182 183 184 185 186 187 188 189 190 191 192 193  | Next Page >