Php artisan migrate unable to access mysql database This is similar to  but my situation is a little different.  I have laravel, composer, and valet running on Ubuntu 18.04. I'm trying to run php artisan migrate and it throws errors related to being unable to connect to the mysql database.   Illuminate\Database\QueryException  : SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost' (SQL: select * from information_schema.tables where table_schema = blog and table_name = migrations)  at /home/david/Sites/blog/vendor/laravel/framework/src/Illuminate/Database/Connection.php:664   660|         // If an exception occurs when attempting to run a query, we'll format the error   661|         // message to include the bindings with SQL, which will make this exception a   662|         // lot more helpful to the developer instead of just the database's errors.   663|         catch (Exception $e) { &gt; 664|             throw new QueryException(   665|                 $query, $this-&gt;prepareBindings($bindings), $e   666|             );   667|         }   668|   Exception trace:  1   PDOException::("SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost'")     /home/david/Sites/blog/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:68  2   PDO::__construct("mysql:host=127.0.0.1;port=3306;dbname=blog", "root", "", [])     /home/david/Sites/blog/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:68   it seems pretty clear to me that the .env file doesn't contain the right information... but it does. here's my .env for mysql database:  DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=blog DB_USERNAME=root DB_PASSWORD=   Database I'm trying to enter is called blog, and the user name is root and the password is blank. That's how I access mysql on my machine... sudo mysql -uroot -p and it logs me right in.  Any idea what might be going wrong?
can't login as mysql user root from normal user account in ubuntu 16.04 I just installed Ubuntu 16.04 LTS along with the packages php, mariadb and nginx. I ran mysql_secure_installation and changed the root password.  Now when I try to login to mysql using the root account while logged in Ubuntu as normal user account I get access denied.   When I login using sudo mysql, mysql doesn't even ask me password. If I run mysql_secure_installtion I see that old settings never got set permanently.   What am I doing wrong?
I want to install lubuntu on my current (pre-existing) Ubuntu Install because of it's light-weight footprint.   Can I preserve currently installed apps after installation? Install CentOS 7 on HP dl120 gen9 server with b140i raid controller I'm trying to install CentOS 7 on a HP DL120 gen 9 server with a b140i controller. I have 4 1TB HDD setup in a raid 1+0 and the CentOS installer doesn't seem to recognize the logical drive created from the storage utility.  From my understanding i need some drivers for CentOS 7 to recognize the B140i controller. Also, the driver seems to be closed source by HP.  What is my approach here? Is there any other free linux OS that i can use on this server and that would recognize the raid controller?  Thank you. Area51 proposals are being advertised now all over the network? "Where will you go" vs. "Where you will go" Which sentence is correct between these?      Where will you go?     Where you will go? Ctrl -C, Ctrl -V not working in different keyboard layout When I am in English, Ctrl+C, Ctrl+V works fine when I need to copy paste. But when I turn to Greek, Ctrl+C and Ctrl+V and basically no shortcut almost works in Greek.  So each time I have to alt shift and go back to English in order to user Ctrl+C to copy something. How can I apply this to the Greek keyboard profile?  EDIT  I also realized that when using NetBeans IDE 7.4,  I can copy and paste in Greek but I can't use the tonic system of the language over the words. In Aptana studio I can't use Copy and paste Ctrl+C, Ctrl+V When using gedit everything works fine. Different software use different keyboard layout settings? Splitting text files based on a regular expression I have a text file which I want to split into 64 unequal parts, according to the 64 hexagrams of the Yi Jing. Since the passage for each hexagram begins with some digit(s), a period, and two newlines, the regex should be pretty easy to write.  But how do I actually split the text file into 64 new files according to this regex? It seems like more of a task for perl. But maybe there's a more obvious way that I'm just totally missing. Prove $f(x) = \sqrt x$ is uniformly continuous on $[0,\infty)$ I have seen a proof in   Below shows an alternative proof. Please correct me if im wrong.  Proof:  For any given $\varepsilon &gt;0$,  Let $\delta_1 = \frac{\varepsilon}{2}$, $\forall x,y \in [1,\infty)$ with $|x-y|&lt;\delta_1$  Since $|\sqrt x + \sqrt y|\geq2$  $$|\sqrt x - \sqrt y|  = \frac{|x-y|}{|\sqrt x+\sqrt y|} &lt; |x-y| &lt; \delta_1 = \frac{\varepsilon}{2}$$  Hence, $\sqrt x$ is uniformly continuous on $[1,\infty)$.  $\sqrt x$ is continuous on [0,1] , so $\sqrt x$ is uniformly continuous on [0,1].  So, there exist $\delta_2 &gt; 0$ such that $\forall x,y \in [0,1], |x-y|&lt;\delta_2$, $|\sqrt x -\sqrt y| &lt;\frac{\varepsilon}{2}$  Let $\delta = \min{(\delta_1,\delta_2)}$  $\forall x,y \in [0,\infty)$ with $|x-y|&lt;\delta$,  Case 1: $x,y \in [0,1]$ Proven above as $|x-y| &lt; \frac{\varepsilon}{2} &lt; \varepsilon$  Case 2: $x,y \in [1,\infty)$ Proven above as $|x-y| &lt; \frac{\varepsilon}{2} &lt; \varepsilon$  Case 3: $x \in [0,1] , y \in [1,\infty]$  $$|\sqrt x-\sqrt y| = |\sqrt x -1+1-\sqrt y| \leq |\sqrt x-1| + |\sqrt y -1| &lt; \frac{\varepsilon}{2} + \frac{\varepsilon}{2}= \varepsilon$$  by applying case 1 and case 2. Why use a certain measure of forecast error (e.g. MAD) as opposed to another (e.g. MSE)? MAD = Mean Absolute Deviation MSE = Mean Squared Error  I've seen suggestions from various places that MSE is used despite some undesirable qualities (e.g. , which states on p8 "It is commonly believed that MAD is a better criterion than MSE. However, mathematically MSE is more convenient than MAD.")  Is there more to it than that? Is there a paper that thoroughly analyzes the situations in which various methods of measuring forecast error are more/less appropriate? My google searches haven't revealed anything.   A similar question to this was asked at , and the user was asked to post on stats.stackexchange.com, but I don't think they ever did. Difference estimate & confidence intervals for $\chi^2$ test between 2 proportions I am using a chi-sq test between two proportions (). I am using this over the z-test for proportions because I do not think my data is normal.   My question is how do I get the difference (shift) estimate &amp; confidence intervals for this test.   For example,     Data1: 193/252=.77   Data2: 154/227=.68   P-value=.032 (I used the formula in the link above. I will also add my exact code below)  Shift Estimate: I assume its the difference between proportions, ie .77-.68=.09. Is this correct?   Confidence Interval: ??????????????????  Code for generating P-value (matlab):   % Pooled estimate of proportion  p0 = (n1+n2) / (N1+N2); % Expected counts under H0 (null hypothesis)  n10 = N1 * p0;  n20 = N2 * p0; % Chi-square test, by hand  observed = [n1 N1-n1 n2 N2-n2];  expected = [n10 N1-n10 n20 N2-n20];  chi2stat = sum((observed-expected).^2 ./ expected);  p = 1 - chi2cdf(chi2stat,1);  H=0; if(p&lt;.05), H=1; end What are these notices above my post? My post has been marked with an informational notice in a box above it.   What should I do about this? Who attaches notices to posts? What kinds of notices are available? What should I do if I think a notice should be added to a post? What should I do if I think a notice should be removed from a post? Reprojecting raster from lat/lon to UTM in R? i have to turn it into a  UTM in order to make the buffer functional.  wets&lt;-readOGR(dsn=".",layer="shapefile") r.raster &lt;- raster() extent(r.raster) &lt;- extent(wets) res(r.raster) &lt;- 100   wets.r &lt;- rasterize(wet,r.raster) plot(wets.r) wetsbuf&lt;-buffer(wets.r,width=500)   During the buffer creation which is the last line of code, it gives this warning:  Warning message:   In couldBeLonLat(x) :   raster has a longitude/latitude CRS, but coordinates do not match that   here's the info    summary(wets.r)           layer  Min.        1  1st Qu.     1  Median      2  3rd Qu.     9  Max.       11  NA's    52629  summary(wets)    Object of class SpatialPolygonsDataFrame Coordinates:       min       max  x  683705  714088.8  y 4326266 4343768.0  Is projected: TRUE   proj4string :  [+proj=tmerc +lat_0=0 +lon_0=24 +k=0.9996 +x_0=500000 +y_0=0 +datum=GGRS87  +units=m +no_defs +ellps=GRS80 +towgs84=-199.87,74.79,246.62]  Data attributes:    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.      0.0     2.5     5.0     5.0     7.5    10.0         wets.r  class       : RasterLayer  dimensions  : 175, 304, 53200  (nrow, ncol, ncell) resolution  : 100, 100  (x, y) extent      : 683705, 714105, 4326268, 4343768  (xmin, xmax, ymin, ymax) coord. ref. : +proj=longlat +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0  data source : in memory names       : layer  values      : 1, 11  (min, max) attributes  :    ID FID  from:  1   0  to  : 11  10   I have to change the prjection in order to be possible to do the buffer. I would like to create some kind of feature matrix with available classes in columns and implemented features as rows. Problem is, that the class names are quite long.  Rotating them by 90° simply looked quite silly, so am looking for alternate ideas.  The only idea I had so far was to write the heading text horizontally with a arrow (or similar) matching the "heading row" with a column. But frankly I have no idea how to do something like this in latex.  An minimal example of my naive approach looks like this.  \documentclass{beamer}  \usepackage{tabularx}  % I am actually using a custom theme % The space ``wasted'' is similar for PaloAlto though \usetheme{PaloAlto}  \begin{document} \frame {   \frametitle{Comparision of boost implemented graph classes}   \begin{tabularx}{\textwidth}{X c c c}     %     % Column Headers, first column is empts     %     & \rotatebox{90}{adjacency\_list}     & \rotatebox{90}{adjacency\_matrix}     & \rotatebox{90}{compressed\_sparse\_row\_graph}      \     %     % Rows, I suspect I need about 10     % Class               adjlist          adjmatrix     csrg     \hline      AdjacencyGraph        & Yes            & No          & Yes \\     Interface \#2         & Yes            & No          & Yes \\     Interface \#3         & Yes            & No          & Yes \\     Interface \#4         & Yes            & No          & Yes \\     Interface \#5         & Yes            & No          & Yes \\     Interface \#6         & Yes            & No          & Yes \\     Interface \#7         & Yes            & No          & Yes \\     Interface \#8         & Yes            & No          & Yes \\     Interface \#9         & Yes            & No          & Yes \\     % Rest omitted   \end{tabularx} } \end{document}    If its important: I am doing this for a presentation with beamer. There is a hint to show that if there were points in $\mathbb{Q}$, then there would exist $r,s, t \in \mathbb{Z}$ with $\gcd(r, t) = 1$ such that $2s^2 = t^4 - 17r^4$ , and then show that any prime dividing $s$ is a quadratic residue modulo $17$.  I'm stuck on the first bit - if you suppose $\left(\frac{a}{b}, \frac{c}{d}\right)$ is a point on the curve in $\mathbb{Q}$ (so $a, b, c, d \in \mathbb{Z}$) then you get to $2a^2d^4 = b^2c^4 - 17b^2d^4$, but I'm not sure where to go from here since you don't know that $b$ is a square? Is there a backquote on the iPhone keyboard? Is there a backquote (backtick `) on the iPhone keyboard, and if so, where is it?  When I'm writing a post on a site in the SE family (especially SO), I want to use the backquote for inline code blocks. Under the single quote key, I've found two curly/angled quotes, but those (’ and ‘) don't seem to do the trick... If a function $f(x)$ is Riemann integrable on $[a,b]$, is $f(x)$ bounded on $[a,b]$? remove isp-provided dns My isp provides a dns service; but unfortunately they do block certain sites. I would like to use opendns or google; but it seems like it doesn't work.    I have set up a wired connection; given a manual ip and entered opendns-ip's in the nameserver field (all through the gui). Still url's are being resolved through my ISP. I have tried to configure the same on my girlfriends laptop (win 7) and I also can't seem to do the setup. My previous computer also was a win 7 and had no problem. (so I believe the problem is 'me') If it were only one site, i could edit the hosts file; but I prefere to circumvent their whole dns server.  Is there something an isp can do to block the use of other dns-servers than theirs? Is it possible to re-route the ISP dns to the opendns? Can I check if the C# compiler inlined a method call? I'm writing an XNA game where I do per-pixel collision checks. The loop which checks this does so by shifting an int and bitwise ORing and is generally difficult to read and understand.  I would like to add private methods such as private bool IsTransparent(int pixelColorValue) to make the loop more readable, but I don't want the overhead of method calls since this is very performance sensitive code.  Is there a way to force the compiler to inline this call or will I do I just hope that the compiler will do this optimization?   If there isn't a way to force this, is there a way to check if the method was inlined, short of reading the disassembly? Will the method show up in reflection if it was inlined and no other callers exist?  Edit: I can't force it, so can I detect it? xticks steps using Pgfplots / dateplot I am trying to align some text to left/center/right in the same line. For example, I want to put my phone number on the left, my name in the center, and my email on the right, how do I do that? showing that a group of order 45 is abelian